Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create / delete connections in DBC
Message
De
21/09/2003 10:44:52
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Create / delete connections in DBC
Divers
Thread ID:
00830930
Message ID:
00830930
Vues:
60
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?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform