Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot Close Database
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Cannot Close Database
Miscellaneous
Thread ID:
00212198
Message ID:
00212198
Views:
53
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.......
Next
Reply
Map
View

Click here to load this message in the networking platform