Maybe the best thing to do is to move the code for back/restore away from the form and into an application object. You can close the form, run the backup/restore, and then open the form again. The form can then do all the work of re-opening the tables.
Alan
>Dear all,
>
>I design a project in which the forms visit tables by setting all tables at data environment object, which are automatically opened and closed. The setting make the program run smoothly and do job so well.
>
>Recently, I implement a backup/restore routine which is programed as by create an WSH object and calling WINRAR to do the job. In order to backup and restore the data, at the opening of my routine codes I close the databases. After the routine is over, the control return to the form the routine called from. I cannot visit the tables with the error message "cannot find allias "XXX"".
>
>What wrong have I done? and how can I do that jod?
>
>
>
>Yours faithfully,
>Ransome
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement