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
Miscellaneous
Thread ID:
00212198
Message ID:
00212212
Views:
27
>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

VFP will not close a database that is included in an open project. Is this your problem?

Also, if there are any tables open with unfinished transactions, they cannot be closed, and therefore their databases cannot be closed.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform