Declare Function SQLConnect Lib "odbc32.dll" (ByVal hdbc As Long, ByVal
szDSN As String, ByVal cbDSN As Integer, ByVal szUID As String, ByVal
cbUID As Integer, ByVal szAuthStr As String, ByVal cbAuthStr As Integer) As
Integer
retcode = SQLAllocEnv(henv) ' OK
retcode = SQLAllocConnect(henv, hdbc) 'OK
sDSN = "Driver={Microsoft Access Driver
(*.mdb)};DATABASE=C:\myDatabase.mdb"
sDSN = "DATABASE=C:\myDatabase.mdb"
sUID = "sa" 'user ID
sPWD = "" 'password
retcode = SQLConnect(hdbc, sDSN, Len(sDSN), sUID, Len(sUID), sPWD,
Len(sPWD)) ' retcode=-1 ???
retcode = SQLDisconnect(hdbc)
retcode = SQLFreeConnect(hdbc) 'OK
retcode = SQLFreeEnv(henv) 'OK
I think my problem is string "sDSN" .... ?
Do you have hint? Thanks
I don't try to give you an answer. Years ago I tried to use odbc32.dll with
no driver. I started from the work: "Ramosoft de Mexico S.A. of C.V.
http://www.ramosoft.com/
Author: Leontti A. Ramos M. mailto:leo...@leontti.net".
I tried to find some example of this technique but with no effort. Can you
suggest me something? I mean examples and so on.
Your
Stefano Boscolo