.net - What is the difference between CommandTimeout and QueryTimeout on the app.config file when using the iSeries Access ODBC Driver? -
i working .net console application who's iseries datasource moved. after move application experienced timeouts led me believe 1 of timeouts needed increased (and yes network connections optimized).
this part of error console application started generating:
error message: error [hy000] [ibm][system access odbc driver][db2 i5/os]sql0666 - sql query exceeds specified time limit or storage limit.
when increased commandtimeout
in code 60 120 worked. think it'd ideal set timeout @ connection string removed line.
at connection string added querytimeout=120
. when ran program, received above error once again.
fyi, here's connection string looks like:
"driver=iseries access odbc driver;system=x.x.x.x;uid=something;pwd=something;querytimeout=120"
what noticed doing data fetch seemed not timeout when querytimeout
set 0 on connection string. setting else fail. meanwhile commandtimeout
property in .net code changed needed , work. bringing me question, difference between querytimeout
, commandtimeout
? , why querytimeout
seem work when it's set 0 not else?
querytimeout boolean value indicates whether or not respect sql_attr_query_timeout value set through commandtimeout property.
querytimeout
specifies whether driver disable support query timeout attribute, sql_attr_query_timeout. if disabled, sql queries run until finish.
0 = disable support query timeout attribute
1 = allow query timeout attribute set
default 1.
commandtimeout
the time in seconds wait command execute. default 30 seconds.
Comments
Post a Comment