Query fails when run via Visual Studio, works fine elsewhere
I receive this error:
[DB2/6000] SQL0952N Processing was cancelled due to an interrupt. SQLSTATE=57014
whenever I run a query via a visual studio project in vb.net. If I run the same query via Open Office Base, it takes a long time but it works. How do I go about troubleshooting whats causing th开发者_如何学Gois?
To add to @Tom H's answer. I had a timeout issue to. The only thing that worked for me is:
iDB2Command cmd = new iDB2Command(sqlStatement, conn);
cmd.CommandTimeout = 600;
That SQLSTATE code indicates a user interruption. It could be caused by a timeout. Check the timeout settings in your Visual Studio project for that particular connection and see if increasing it helps.
Since it's DB2, you might also need to take a look for the db2cli.ini
file and increase the QUERYTIMEOUT INTERVAL
there.
精彩评论