I have a small web app that runs sql queries for users, that prints the results to pdf/csv. For larger queries, I am getting this error:
ERROR [57014] [IBM][DB2/AIX64] SQL0952N Processing was cancelled due to an interrupt. SQLSTATE=57014
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: IBM.Data.DB2.DB2Exception: ERROR [57014] [IBM][DB2/AIX64] SQL0952N Processing was cancelled due to an interrupt. SQLSTATE=57014
After doing research, It turns out I need to add a QueryTimeout
parameter to my connection string. I don't have much experience with vb.net aside from some simple edits. My relevant code looks like this:
Imports IBM.Data.DB2
Dim conn As New DB2Connection(ConfigurationManager.AppSettings(ddDatabase.SelectedValue))
Dim cmd As New DB2Command(strSQL, conn)