Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sqlconnect seems determined to ask for more info
Message
De
20/01/1999 13:24:17
 
 
À
20/01/1999 13:11:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00178140
Message ID:
00178150
Vues:
27
Hi Denise ---

Still wrestling with ODBC, huh?

OK, it may be that you are supplying the wrong values with SQLCONNECT(). You should be connecting with

nConn=SQLCONNECT(DataSourceName,DataUserID,DataPassword)

The Datasource name should be defined. Look into your system settings to see if you have a DSN defined with that DataSource name.

The DataUserID should be the UserID expected by the database -or- ODBC and has nothing to do with your network login ID. Same for password.

Now, if I recall, you're working with Access. Go to the ODBC Data Source Administrator app in Control Panel. Go to the System DSN tab. Hit the Add button and then choose MS Access 97 as your datasource. Give the new System DSN a name (such as "mydata") and select which MDB file you want to connect to. In VFP, then, all you need from there on is:

nConn=SQLCONNECT("mydata","","") && No need for UserID or Password.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform