0

I'm trying to run a rather complex view in Visual Studio against a Microsoft SQL Server Database File. I am receiving a SQL Command Timeout error.

Where can I increase the Command Timeout parameter?

Glenn Cooper
  • 157
  • 2
  • 13
  • tbh you could have fired your question into google and taken any of the top results https://www.google.ie/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=c%23%20increase%20sql%20timeout – user1666620 Mar 22 '16 at 15:51
  • Possible duplicate of [Connection timeout for SQL server](http://stackoverflow.com/questions/4308417/connection-timeout-for-sql-server) or http://stackoverflow.com/questions/1111837/how-to-extend-the-timeout-of-a-sql-query if you want to do it programmatically – user1666620 Mar 22 '16 at 15:53
  • I'm still in the Server Explorer therefore don't have access to the ConnectionTimeOut in code. It's a setting in VS somewhere, which I can't find – Glenn Cooper Mar 22 '16 at 15:54
  • then check the connection string http://stackoverflow.com/questions/4308417/connection-timeout-for-sql-server – user1666620 Mar 22 '16 at 15:54
  • 1
    That only changes the Connection TimeOut. I need to change the Command TimeOut – Glenn Cooper Mar 22 '16 at 16:00
  • Possible duplicate of http://stackoverflow.com/questions/510752/how-can-i-change-the-timeout-for-a-manually-executed-query-in-sql-server – Wicher Visser Mar 22 '16 at 16:04
  • YOU should tag this correctly for Microsoft SQL Server and not mysql. Those are two different database and the answers are different. However that said, It is likely that increasing your timeout is not the answer. You likely need to improve your query or indexing. – HLGEM Mar 22 '16 at 17:14
  • One problem I have is that I'm developing on Visual Studio on an iMac via Parallels. Whilst it seems to operate well 99% of the time, some of these views I'm running are running slower and slower. With regards to improving query and indexing, I will most likely have to look at that more. But my query involves selecting data from over 15 tables (with 10,000s of records each) with a lot of cross referencing and multiple joins, with unions thrown in as well. It is rather complex. Despite changing all settings to maximum TimeOut (that I can find), I'm still experiencing an issue – Glenn Cooper Mar 22 '16 at 18:16

0 Answers0