General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only