We use Gupta 4.2
Connect to Sybase database
I tried to control the duration of timeout for procedure execution but it didn't work.
in sql.ini/section [sybgtwy]:
locktimeout=0 ! Make the execution time out 60 seconds (default value) for the whole application
I need to increase the time out for procedure execution takes big time, but I tried 2 seconds below just to check how the feature works.
The Code used in execution is:
Call SqlSetParameter ( hSql, DBP_LOCKWAITTIMEOUT, 2, '' ) ! Modify the time out to be 2 seconds
Call SybExecuteProc( hSql, "declare @nRC int
Exec @nRC = atm..psp_atm_copy_alt 0,Null ,:gnEmployeeID
select @nRC", ":CopyServices.nRC" )
Call SqlSetParameter ( hSql, DBP_LOCKWAITTIMEOUT, 60, '' ) ! Modify the time out to be 60 seconds as default
I expect raising time out message after 2 seconds but it didn't happened.
Kindly advise about how to control the execution time out.
Control the execution time out duration
Re: Control the execution time out duration
SqlSetLockTimeout( hSqlDataBase, 2 ) ?
Re: Control the execution time out duration
Hi,
I tried the recommended command as below.
The execution takes 50 seconds but there is no time out message after 2 seconds:
Call SqlSetLockTimeout( hSql, 2 ) ! Modify the time out to be 2 seconds
Call SybExecuteProc( hSql, "declare @nRC int
Exec @nRC = atm..psp_atm_copy_alt 0,Null ,:gnEmployeeID
select @nRC", ":CopyServices.nRC" )
Call SqlSetLockTimeout( hSql, 60 ) ! Modify the time out to be 60 seconds as default
I tried the recommended command as below.
The execution takes 50 seconds but there is no time out message after 2 seconds:
Call SqlSetLockTimeout( hSql, 2 ) ! Modify the time out to be 2 seconds
Call SybExecuteProc( hSql, "declare @nRC int
Exec @nRC = atm..psp_atm_copy_alt 0,Null ,:gnEmployeeID
select @nRC", ":CopyServices.nRC" )
Call SqlSetLockTimeout( hSql, 60 ) ! Modify the time out to be 60 seconds as default
Re: Control the execution time out duration
Does Call SqlSetLockTimeout( hSql, 2 ) return True?
Re: Control the execution time out duration
Hi,
I tried:
If SqlSetLockTimeout( hSql, 2)
instead of:
Call SqlSetLockTimeout( hSql, 2)
And it works fine.
Thanks for support.
Another point:
locktimeout configuration from sql.ini doesn't affect this lock time out (Why?)
If locktimeout from sql.ini = 0
What is the lock time out period?
What is the default lock time out and how to set?
I tried:
If SqlSetLockTimeout( hSql, 2)
instead of:
Call SqlSetLockTimeout( hSql, 2)
And it works fine.
Thanks for support.
Another point:
locktimeout configuration from sql.ini doesn't affect this lock time out (Why?)
If locktimeout from sql.ini = 0
What is the lock time out period?
What is the default lock time out and how to set?
Re: Control the execution time out duration
The sql.ini is the default and SqlSetLockTimeout overrides this for the period that the program runs. Any other program (including sqltalk) will use the sql.ini value.
Re: Control the execution time out duration
Thanks for support and consider the issue is closed.
Who is online
Users browsing this forum: [Ccbot], [Google] and 1 guest