Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Test for active database
Here's the problem
I developed a short cut key (alt-L) that prepares the screen for a cut and paste input into a text file - from there the data is processed into 2 or 3 databases.
This operation is repeated umpteen times a day and alas the operators get confused sometimes and end up pressing the shortcut twice and low and behold, they end up pasting material into an active database and corrupting the file.
i have therfore only been able to provide an alert that they have corrupted the main database and to use a backup before continuing - a warning AFTER the fact.
question
is there a way to test that when the paste occurs into a database that it is the CORRECT database it is appending into. that the program will not accept the paste unless it is the correct database - perhaps a command BEFORE the 'append from m.txt type sdf' to test what the database is that is being appended and to issue an abort is database is not correct one.
perhaps something like this: (let's call the correct database right.dbf)
close alte
modi file m.txt &&& here is here the cut and paste occurs
CLOS ALTE
CLEAR
if active database is not right.dbf && here is where i need the correct code)
messagebox("Incorrect database - process has been aborted")
close all
return
endif
append from m.txt type sdf && if program passes the above test then program will proceed
thanks for your continued help.
k
Suivant
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