Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create / delete connections in DBC
Message
From
21/09/2003 10:53:14
 
 
To
21/09/2003 10:44:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00830930
Message ID:
00830931
Views:
18
If you include the DBC in the EXE, it becomes read only.

>is it possible to create and / or delete a named connection in a DBC especially if the DBC is included in the EXE file?
>
>i've tried creating and deleting a named connection in a DBC during development (running a test program intuitively), however, when i build the exe (consisting of the test.prg AND the DBC) and run the exe, it seems that the program isn't able to access the DBC...
>
>here's the code of my test program..
>
>
>1:LOCAL lcConn1, lcConn2
>
>2:lcConn1 = "DRIVER=SQL Server;SERVER=HOMEPC;UID=sa;PWD=;WSID=HOMEPC;DATABASE=Northwind"
>3:lcConn2 = "DRIVER=SQL Server;SERVER=HOMEPC;UID=kss1x;PWD=wowie;WSID=HOMEPC;DATABASE=Northwind"
>
>4:cd c:\vfpfiles\ks
>5:set path to c:\vfpfiles\ks
>6:OPEN DATABASE DATA1
>7:SET DATABASE to DATA1
>
>8:WAIT WINDOW "Deleting Connections..."
>
>9:DELETE CONNECTION conn2
>10:DELETE CONNECTION Wowie
>
>11:WAIT WINDOW "Creating Connections.. "
>
>12:CREATE CONNECTION conn2 CONNSTRING lcConn1
>13:CREATE CONNECTION Wowie CONNSTRING lcConn2
>
>14:WAIT WINDOW "Success..."
>
>
>
>the WAIT WINDOW lines work properly even when i run the program as an EXE... however, error messages pop out on the
>
>Errors:
>
>1. "Cannot update the cursor" after executing line 8 and 9
>2. "Database is read only" after executing line 12 and 13
>
>is it really impossible to update data in a DBC that's included in an EXE?
>
>are there any workarounds?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform