Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create System DSN?
Message
 
To
19/08/1999 15:11:12
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00255432
Message ID:
00255859
Views:
14
>I had this same problem about 6 month's
>ago and was unable to come up with an
>answer even from microsoft. Let me know
>if you come up with an answer
>thanks
>Darren Mc Dowell


I GOT IT! :)

Here's the code, copy/paste into a file, save this in your code base for later use.

DECLARE Integer SQLConfigDataSource;
in odbccp32.dll;
Integer, Integer, String, String

cSettings="DSN=elSFoxy"+;
chr(0)+"Description=elSDescFoxy"+;
chr(0)+"SourceDB=D:\src\foxy1.dbc"+;
chr(0)+"SourceType=DBC"+;
chr(0)+"Exclusive=Yes"

? SQLConfigDataSource(0,4,"Microsoft Visual FoxPro Driver",cSettings)


* Information came from MSDN Support
* In the MSKB examples, etc., the parameters after SQLConFigDataSource
* show (0,1.... which is for a User DSN. Just change the "1"
* to a "4" which is the system code for a System DSN.
* This information and more is in the MSDN Library, do a search
* on SQLConfigDataSource and there is (some) information there.
* Also, if you must install Visual C++, look in the .....\include
* dir or "Program Files\Visual Sutudio\VC98\Constants"
* directory, there is a header file (odbcinst.h) showing all the
* different constants/parms you can pass/check to/for the ODBC subsystem
Previous
Reply
Map
View

Click here to load this message in the networking platform