I use the following command :

invoke SQLDriverConnect, hConn,hDlg, addr strConnect, sizeof strConnect, addr Conn, sizeof Conn,addr StrLen, SQL_DRIVER_COMPLETE
When these are the values :
hConn dd ?"
"strConnect db "DRIVER=InterBase 5.x Driver by Visigenic (*.gdb);Database=C:\PROGRA~1\SmarTeam\db\SmCatia.gdb;",0

"Conn db 256 dup(?)"
"StrLen dd ?"

the function fails - why ? (the problem is not with the server or database!)
Posted on 2002-03-12 04:17:38 by Lsx
Many things may be wrong. Assuming the server is ok:
1) Use the brackets:
strConnect db "DRIVER={InterBase 5.x Driver by Visigenic (*.gdb)};"
2) You are just trying to connect to the driver, so you don't need the database name. Do not specify any path or file name, this will help you to locate the problem more easily, and will not affect the SQLDriverConnect function. If the function succeeds, you can try to modify the connection string.
3) Check if hConn is a valid handle (as returned by SQLAllocHandle)

What's the cause of the problem according to SQLError ?
Posted on 2002-03-12 09:28:01 by micmic