Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a DSN by VFP
Message
From
25/04/2005 19:56:25
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01008278
Message ID:
01008290
Views:
20
Hi Anatoliy,

Thanks for the help. I found my problem.

>The following is a fragment from code sample
>
>Adding an ODBC data source with the SQLConfigDataSource; use automatic or interactive mode
>http://www.news2news.com/vfp/?example=381&function=584
>
>#DEFINE ODBC_ADD_DSN 1
>
>* accessign VFP free tables in a directory
>cDriver = "Microsoft Visual FoxPro Driver"
>cAttributes =;
>	"DSN=NewVFP2" + Chr(0) +;
>	"Description=Sample VFP Data Source" + Chr(0) +;
>	"SourceDB=C:\data\vfp\payroll" + Chr(0) +;
>	"SourceType=DBF" + Chr(0) +;
>	"Collate=Machine" + Chr(0) +;
>	"BackgroundFetch=Yes" + Chr(0) +;
>	"Exclusive=No" + Chr(0)
>
>hWindow = GetActiveWindow()
>
>IF SQLConfigDataSource(hWindow,;
>	ODBC_ADD_DSN, cDriver, cAttributes) = 0
>	= MessageBox("Error!", 48, " Error")
>ENDIF
>
>Hope it helps.
Previous
Reply
Map
View

Click here to load this message in the networking platform