Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File is in use messege
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
File is in use messege
Divers
Thread ID:
00626525
Message ID:
00626525
Vues:
34
I have the following code and when I execute it, I keep getting a message that "file is in use". Does anyone know what I am doing wrong? I am trying to wipe out my tables using command button.
					case nAnswer2 = 6
						clos database
						open database payroll exclusive
						set safety off					
						use
						delete file curdir()+'pay_file\*.*'
						delete file curdir()+'pay_processed\*.*'
						
						use dbf_process exclusive
						zap
						
						use dept_tbl exclusive
						zap 
						
						use div_tbl exclusive
						zap
						
						use dropdown_tbl exclusive
						zap

						use errorlog_tbl exclusive
						zap
						
						use nextid exclusive
						update nextid set Nnextid = 1 where alltrim(Ctablename) == 'DBF_PROCESS'
						update nextid set Nnextid = 1 where alltrim(Ctablename) == 'PP_TBL'
						update nextid set Nnextid = 1 where alltrim(Ctablename) == 'UNPROCESS_TBL'
						update nextid set Nnextid = 1 where alltrim(Ctablename) == 'PAYROLL_TBL'
						update nextid set Nnextid = 1 where alltrim(Ctablename) == 'DIV_TBL'
						update nextid set Nnextid = 1 where alltrim(Ctablename) == 'GRANT1'
						update nextid set Nnextid = 1 where alltrim(Ctablename) == 'GRANT2'
						update nextid set Nnextid = 1 where alltrim(Ctablename) == 'LOC_TBL'
						update nextid set Nnextid = 1 where alltrim(Ctablename) == 'UNIT_TBL'
						update nextid set Nnextid = 1 where alltrim(Ctablename) == 'LOG_TBL'
						update nextid set Nnextid = 1 where alltrim(Ctablename) == 'TITLE_TBL'
						update nextid set Nnextid = 1 where alltrim(Ctablename) == 'HLDXFER_TBL'
						update nextid set Nnextid = 1 where alltrim(Ctablename) == 'DEPT_TBL'
						
						USE
						set safety on
						messagebox("Program is now RESET.  This program will now quit, you will have to restart the program.",0,"RESET MESSAGE")
											
					case nAnswer2 = 7
						messagebox('NO DATA ZAPPED',0,'WARNING')
				
			
Thanks
Nick Patel
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform