Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement