For all of my application, I have SET DELETED ON so I do not display deleted records.
HOWEVER, in one program, I do want to use xBrowse to see ALL records.
Is there a flag for xBrowse that will allow me to view ALL records, including the deleted records, for just that file ?
I have tried the command line to SET DELETED OFF but that isn't working.
View deleted records in xBrowse
View deleted records in xBrowse
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
- Marc Venken
- Posts: 1481
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
Re: View deleted records in xBrowse
Maybe if you would make or have a index on for deleted on that file you can use this :
Here : http://forums.fivetechsupport.com/viewt ... 4075ade8a8
Here : http://forums.fivetechsupport.com/viewt ... 4075ade8a8
Marc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: View deleted records in xBrowse
Dear Tim,
I just tested FWH\samples\fivedbu.prg and changed this line:
SET DELETED ON // OFF
and then I did this before creating the XBROWSE (look for XBROWSE inside fivedbu.prg):
SET DELETED OFF
and the deleted records are properly shown
I just tested FWH\samples\fivedbu.prg and changed this line:
SET DELETED ON // OFF
and then I did this before creating the XBROWSE (look for XBROWSE inside fivedbu.prg):
SET DELETED OFF
and the deleted records are properly shown
Re: View deleted records in xBrowse
Marc and Antonio,
Here is the problem. I have a File Editor built into my ( very large ) application. ( It is NOT FiveDBU though I do work with that. Mine is a full CLASS build and just for DBF at this time ).
In the Main() module, I use SET DELETED ON because my clients never want to see Deleted records.
However, in the Editor, it would be helpful to see them. IF I use SET DELETED OFF in the Editor, since it is MDI, it now applies that to anywhere in the full program, and DELETED records are suddenly visible.
Placing the SET command is the challenge. It would be easier if I had the ability to actually have it apply in the xBrowse ... but that may not be possible.
After looking at the source for the classes, and any documentation, I couldn't find any answer ..
Marc, thats a lot of overhead to do the indexing, and might not solve the problem anyway. Thanks for the idea ...
Tim
Here is the problem. I have a File Editor built into my ( very large ) application. ( It is NOT FiveDBU though I do work with that. Mine is a full CLASS build and just for DBF at this time ).
In the Main() module, I use SET DELETED ON because my clients never want to see Deleted records.
However, in the Editor, it would be helpful to see them. IF I use SET DELETED OFF in the Editor, since it is MDI, it now applies that to anywhere in the full program, and DELETED records are suddenly visible.
Placing the SET command is the challenge. It would be easier if I had the ability to actually have it apply in the xBrowse ... but that may not be possible.
After looking at the source for the classes, and any documentation, I couldn't find any answer ..
Marc, thats a lot of overhead to do the indexing, and might not solve the problem anyway. Thanks for the idea ...
Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: View deleted records in xBrowse
Though SET DELETED ON/OFF is a global setting effecting all WorkAreas, it is still possible to do what you want. There are several ways. I will be posting a few samples soon. Please wait.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: View deleted records in xBrowse
Dear Tim,
you could use the xbrowse container window bGotFocus and bLostFocus to SET DELETED ON and OFF
you could use the xbrowse container window bGotFocus and bLostFocus to SET DELETED ON and OFF
Re: View deleted records in xBrowse
That didn't work ... at least with the ways I tried.
My TEMPORARY WORKAROUND is when I start the Editor, I SET DELETED OFF. Then, upon exit, using the VALID clause I can call a function to SET DELETED ON.
The main problem with this is it is still universal. So if they use the Editor, and don't end it, then SET DELETED OFF is still active, and every browse in the system will show the deleted records again.
What would be helpful is if we could isolate the deleted to the tDatabase class. For now, I will play with this to see if I can better protect it.
My TEMPORARY WORKAROUND is when I start the Editor, I SET DELETED OFF. Then, upon exit, using the VALID clause I can call a function to SET DELETED ON.
The main problem with this is it is still universal. So if they use the Editor, and don't end it, then SET DELETED OFF is still active, and every browse in the system will show the deleted records again.
What would be helpful is if we could isolate the deleted to the tDatabase class. For now, I will play with this to see if I can better protect it.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: View deleted records in xBrowse
Tim,
It is possible to do INDEX ON ... FOR NOT DELETED
And you can create another index without that clause.
Then you can just switch indexes to get all records or only records not deleted.
I haven't tested this.
James
It is possible to do INDEX ON ... FOR NOT DELETED
And you can create another index without that clause.
Then you can just switch indexes to get all records or only records not deleted.
I haven't tested this.
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Re: View deleted records in xBrowse
James,
My concern was my clients. I figured they wouldn't normally use this capability.
I resolved it by doing the following:
1) I left SET DELETED ON when starting the program
2) I put in a Menu item that calls a Function:
The ACTION statement refreshes the browse after running the function.
3) When exiting the editor, the program executes SET DELETED ON
With these steps I eliminated my concern. A client who uses the editor to simply make a change to raw data will not create any problems. Hopefully this will work.
There are already many indexes. I prefered not to go that route. The main reason for this capability is sometimes clients accidentally delete a record. When they call for help, I had to use a different program to recall the record. Now I can do it here, very easily.
My concern was my clients. I figured they wouldn't normally use this capability.
I resolved it by doing the following:
1) I left SET DELETED ON when starting the program
2) I put in a Menu item that calls a Function:
Code: Select all | Expand
FUNCTION SelDelStatus
IF MsgYesNo( "Do you wish to display deleted records ?" )
SET DELETED OFF
ELSE
SET DELETED ON
ENDIF
RETURN NIL
3) When exiting the editor, the program executes SET DELETED ON
With these steps I eliminated my concern. A client who uses the editor to simply make a change to raw data will not create any problems. Hopefully this will work.
There are already many indexes. I prefered not to go that route. The main reason for this capability is sometimes clients accidentally delete a record. When they call for help, I had to use a different program to recall the record. Now I can do it here, very easily.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit