Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Safe Database Open Code
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Safe Database Open Code
Divers
Thread ID:
00643293
Message ID:
00643293
Vues:
40
This isn't quite working. What I am trying to do (and without the macro expansion if I can help it) is open the database if it is not already open, and if it is already open then close-reopen it with the appropriate parameters. The problem is that it is not closing and re-opening.
	*	Database Open
		Function DOpen
		Lparameters cDBCPath,cDBCParms
			Local aDBCs
			Dimension aDBCs[1]
			If ADatabases(aDBCs)=0
				Open Database ( cDBCPath ) &cDBCParms
				Return .t.
			EndIf
			iPos = ASCAN(aDBCs, JustFname(cDBCPath) )
			If iPos <> 0
				Set Database To ( cDBCPath )
				Close Databases
				Open Database ( cDBCPath ) &cDBCParms
			Else
				Set Database To
				Open Database ( cDBCPath ) &cDBCParms
				Set Database To ( JustStem( JustFname(cDBCPath) ) )
			EndIf
		Return .t.
		EndFunc
...open("e:\database.dbc","shared noupdate")
I cannot create a table
...open("e:\database.dbc","shared")
I still cannot create a table
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform