Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sqlconnect seems determined to ask for more info
Message
From
20/01/1999 13:24:17
 
 
To
20/01/1999 13:11:35
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00178140
Message ID:
00178150
Views:
26
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform