Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot Close Database
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Cannot Close Database
Divers
Thread ID:
00212198
Message ID:
00212198
Vues:
54
Hi Everyone,

I have a wierd problem trying to open a database and dynamically configur a connection. I have no other objects in the database except the connection in question. When the delete connection line of code runs, I get a database in must be opened exclusively. Also I notice that the close databases all does not close the database in question according to the foxpro stanadrd toolbar. Here is the code I'm trying to use:

*-- Close SQL connection that App Server has
loProcess.oCGIServer.oSQLServer.Disconnect()
CLOSE DATABASES ALL
*-- Instantiate connection to AppServer DB
OPEN DATABASE (loProcess.oCGIServer.cAppServerDB + "\IMEBSSVR") EXCLU
USE (loProcess.oCGIServer.cAppServerDB + [\CONFIG]) IN 0 SHARED ALIAS EBSCONFIG AGAIN
GO lnRec IN EBSCONFIG
IF INDBC(ALLTRIM(EBSCONFIG.ITEM_NAME),[CONNECTION])
DELETE CONNECTION ALLTRIM(EBSCONFIG.ITEM_NAME)
ENDIF
CREATE CONNECTION (UPPER(EBSCONFIG.ITEM_NAME)) CONNSTRING (ALLTRIM(EBSCONFIG.ITEM_DATA))
CLOSE DATABASES ALL
OPEN DATABASE (loProcess.oCGIServer.cAppServerDB + "\IMEBSSVR") SHARED


Any ideas?

Thanks in advance
Jon
JJ-
One man gathers what another man spills.......
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform