Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Configuring ODBC Connections
Message
From
14/01/2001 18:04:34
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00462621
Message ID:
00463606
Views:
29
Ken,

FYI, using the ODBC Data Source Administrator, you can create any ODBC connection on your pc and save it to a DSN file. If you open the DSN file, it will have all the information you need to make a "DSN-less" connection using SQLSTRINGCONNECT.

For instance, I create a DSN file for a connection to one of my DBCs.
Opening the file I see:

[ODBC]
DRIVER=Microsoft FoxPro VFP Driver (*.dbf)
UID=
Deleted=Yes
Null=Yes
Collate=Machine
BackgroundFetch=Yes
Exclusive=No
SourceType=DBC
SourceDB=K:\Data\CCS\5768TestRun\CCSBusiness.DBC

This I translate into VFP code as :
cSTr = "Description=My Connection;DRIVER=Microsoft FoxPro VFP Driver (*.dbf);"+;
"Deleted=Yes;Null=Yes;Collate=Machine;BackgroundFetch=Yes;Exclusive=No;SourceType=DBC;"+;
"SourceDB = c:\Business.DBC"

nConn = SQLSTRINGCONNECT(cStr)

Now any pc with access to c:\Business.DBC, and the Microsoft FoxPro VFP Driver installed can successfully run this code and access the dbc.

Anthony Letts
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform