>way??
>>>
>>>thanks for your responses
>>>
>>>mark oliva
>>
>>You may use SQLConfigDataSource API call (in odbccp32.dll) to create ODBC source on-fly.
>
>Thanks, and perhaps you can also direct me to the more info about this DLL
>
>mark
This is just an example (actually it was originated by Mr. McCasland):
cODBCDriver="Microsoft Visual FoxPro Driver"
cString="SourceDB=\\MyServer\MyData\MyDatabase.dbc"+CHR(0)+;
"DSN=MyVFP"+chr(0)+;
"Description=VFP Database"+CHR(0)+;
"SourceType=DBC"+CHR(0)+;
"BackgroundFetch=Yes"+CHR(0)+;
"Exclusive=No"+CHR(0)+;
"Collate=Machine"+CHR(0)+;
"SetNoCountOn=No"+CHR(0)
#define ODBC_ADD_DSN 1
#define ODBC_CONFIG_DSN 2
#define ODBC_REMOVE_DSN 3
#define ODBC_ADD_SYS_DSN 4
#define ODBC_CONFIG_SYS_DSN 5
#define ODBC_REMOVE_SYS_DSN 6
#define ODBC_REMOVE_DEFAULT_DSN 7
DECLARE Integer SQLConfigDataSource in odbccp32 Integer, Integer, String, String
=SQLConfigDataSource(0,ODBC_ADD_DSN,cODBCDriver,cString)
Edward Pikman
Independent Consultant