
Using SQLConfigDataSource to access mdb file via ODBC
I'm trying to call SQLConfigDataSource API to create a
DSN entry to read an Access database from VFP.
The problem is I don't know what string to pass as 4th argument.
I tried "DSN=temp"+CHR(0)+"Description=temp"+CHR(0)+"DBQ=c:\test.mdb"
but it doesn't work.
Example:
err=SQLConfigDataSource(0,1,"Microsoft Access Driver",
"DSN=temp"+CHR(0)+"Description=temp"+CHR(0)+"DBQ=c:\test.mdb")
I successfully created DSN entry for VFP tables in the same way
(the string is obviously different).
Someone can help me?
I can't use a static DSN. I need to call the API to create the entry.
--
Andrea Mariottini