Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: qConnect error ODBC
The qConnect function fails with a return error of -1 (SQL_ERROR).
I have run out of ideas now, can anybody help?
ErrorMode(@OFF) retcode = qConnect(hdbc, Datasource, "", "") ErrorMode(@CANCEL) err=qerror(hdbc,1) webout(err,1) If (retcode != @qSuccess) && (retcode != @qSuccessInfo) Message("qConnect failed", retcode) Exit Endif
The error message returned from the driver, should clear things up.
I have spotted the problem now. The qError function finally helped me track this down.
As part of the profile for the IUSR_machinename account I was including a folder in the PATH environment containing the DLLs required for the DB connection. It seems that the profile definitions are not used when the account is only providing the 'service logon' requirement. I even tried including this folder in the machine PATH environment, which still made no difference. As soon as I put the DLLs in the system32 folder all was well.
Article ID: W12540
Filename: ODBC Extender with WebBatch problems.txt
File Created: 2017:07:28:13:58:32
Last Updated: 2001:01:09:15:56:46