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.......