>>>>>I tried this code, but it asks me DSN name. Where is my mistake?
>>>>>
>>>>>xconn=SQLSTRINGCONNECT("Provider=Advantage.OLEDB.1;Data Source=d:\prg\kalem\data\cem2004;"+;
>>>>> "ServerType=ADS_LOCAL_SERVER;"+;
>>>>> "TableType=ADS_VFP_TABLE;LockMode=ADS_COMPATIBLE_LOCKING")
>>>>>
>>>>
>>>>You use OLEDB string to connect with ODBC.
>>>
>>>So?
>>
>>So, an OLE DB connection string is not the same as a ODBC connection string. One specifies an OLE DB provider, which can't be used with ODBC, and the other specifies an ODBC driver, which can't be used with OLE DB/ADO.
>>
>>Use something like:
>>
>>driver=Advantage StreamlineSQL ODBC;DataDirectory=d:\prg\kalem\data\cem2004; etc.
>>
>>Doug
>
>It still asks me dsn name. Where's my mistake?
>
>
>xconn=SQLSTRINGCONNECT("Provider=Advantage StreamlineSQL ODBC;Data Source=d:\prg\kalem\data\cem2004;"+;
> "ServerType=ADS_LOCAL_SERVER;"+;
> "TableType=ADS_VFP_TABLE;LockMode=ADS_COMPATIBLE_LOCKING")
>
You still ask for OLEDB connection :-)
When you have PROVIDER in connection string you don't use ODBC.
Try this:
SQLSETPROP(0,"DispLogin", 3)
TEXT TO lcConnect NOSHOW PRETEXT 15
Driver=Advantage StreamlineSQL ODBC;
Data Source=d:\prg\kalem\data\cem2004;
ServerType=ADS_LOCAL_SERVER;
TableType=ADS_VFP_TABLE;
ENDTEXT
xconn=SQLSTRINGCONNECT(lcConnect)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.