Hi All,
Is there any function/s to save and restore work areas, indexes, relations, record numbers etc (which may be used during LostFocus and GotFocus of a window)?
Do you have any idea about it?
IMHO, it is required mainly for .dbf and RDDs.
TIA.
With best regards.
Sudip
Save and restore workarea, index etc.
Moderator: Rathinagiri
Save and restore workarea, index etc.
With best regards,
Sudip
Sudip
Re: Save and restore workarea, index etc.
Hi Sudip, please take a look at following code:
I hope is helpful for you, or you can give an idea for what you need
Greetings
Javier
Code: Select all
/****
*
****/
Function SaveDbf( )
Return( { Select(), Iif( Used(), OrdSetFocus(), .F.) , Iif( Used(), Recno(), .F. ) } )
/********/
/****
*
****/
Procedure RestDbf( _Arreglo )
Select( _Arreglo[1] )
If ValType( _Arreglo[2] ) = "C" .and. ! Empty( _Arreglo[2] )
OrdSetFocus( _Arreglo[2] )
Endif
If ValType( _Arreglo[3] ) = 'N'
Go _Arreglo[3]
Endif
Return
/********/
Greetings
Javier
Re: Save and restore workarea, index etc.
Hello Javier,
Thanks a lot. Your code will be extremely helpful
With best regards.
Sudip
Thanks a lot. Your code will be extremely helpful

With best regards.
Sudip
With best regards,
Sudip
Sudip
Re: Save and restore workarea, index etc.
Dear Sudip,
Pls go thru the attached program, this is platform independent and extremly useful to save and restore database information.
Before changing the workarea, use dstk_push(), after your database operations use dstk_pop()
This program is from the book on clipper programming by Rick Spence.
Warm regards,
Jayadev
Pls go thru the attached program, this is platform independent and extremly useful to save and restore database information.
Before changing the workarea, use dstk_push(), after your database operations use dstk_pop()
This program is from the book on clipper programming by Rick Spence.
Warm regards,
Jayadev
- Attachments
-
- DBF_STK.zip
- (984 Bytes) Downloaded 247 times
Re: Save and restore workarea, index etc.
Thanks a lot Jayadev.jayadevu wrote: Pls go thru the attached program, this is platform independent and extremly useful to save and restore database information.
Before changing the workarea, use dstk_push(), after your database operations use dstk_pop()
This program is from the book on clipper programming by Rick Spence.
Now, is it possible to add SET RELATION in those functions (both from Rick Spence and Jayadev)?
With best regards.
Sudip
With best regards,
Sudip
Sudip