Re: how to execute "set local mode to wait" with ODBC
Posted in 1998
On Thu, 06 Aug 1998 21:29:30 GMT, glivengo@nwpacifica.net wrote:
>Dear All Knowing Informix developers, I am trying to figure out how to
>execute the "set lock mode to wait" for my ODBC connection to an informix DB.
> note that I am running NT4.0 SP3 and using MFC 3.0's CDatabase and
>CRecordset Classes. I tried placing the command in an SQLExecDirect call as
>follows: RETCODE rc = SQLExecDirect(hStmt, (_TUCHAR*)"{set lock mode to
>wait}", SQL_NTS); but I am getting a syntax error from the statement.
>
> I would appreciate it if someone would show me the actual commands that I
>need to execute to set this informix variable.
>
>Thank you in advance for your help,
>--Greg Livengood
Greg,
Don't give up hope ... you only left off the number of seconds in the
set lock mode statement.
The syntax is "set lock mode to wait n" where n is the number of
seconds.
So in you instance, if you wanted a 60 second lock wait, change your
code to read
RETCODE rc = SQLExecDirect(hStmt, (_TUCHAR*)"{set lock mode to
wait 60}", SQL_NTS);
Hope this helps
Ciao
Fuzzy
:-)