none
[Microsoft] [ODBC SQL Driver] Timeout Expired

    Question

  •  

    Hi ,

     

    Well i have one question regarding the Timeout . I have an SQL SERVER 2005 database and have an VB6.0 application. I have a stored procedure which inserts more than 90,000 rows from one table to another . Some times i get an exception as [Microsoft] [ODBC SQL Driver] Timeout Expired  in the Visual Basic application and some times it works fine. The exception i receive within 30 seconds , but when i try the same stored procedure in query analyser , it works fine. also i have increased the timeout in visual basic , but still i get the same error.

     

    Can anyone suggest.....

    Tuesday, February 05, 2008 1:27 PM

Answers

  • Your “command timeout” is expiring. If you are using VB6, my guess is you are accessing SQL Server through ADO. Correct? In ADO you set that timeout value through Command.Timeout. You cannot set it through the connection string.

     

    You seem to be using MSDASQL as an ADO provider. Have you tried SQLOLEDB? Was there any performance difference?

     

    Zlatko Michailov

    Program Manager, SQL Server Connectivity

    Microsoft Corp.

     

    If you are satisfied by this post, please mark it as “Answer”.

    Wednesday, August 20, 2008 5:06 PM

All replies

  •  

    Which timeout did you configure, in many cases people increase the connectiontimeout which is wron in that casse. Increase the commandtimeout of the command executed. THe problem can be based on the the fact that you using different providers for each of the appliations.

    Jens K. Suessmeyer

    ---
    http://www.sqlserver2005.de
    ---

    Tuesday, February 05, 2008 9:28 PM
    Moderator
  • I am having the same issue. I have already increased the commandtimeout. The strange thing is after I run it the first time I get after about 30 seconds, the Timeout Expired but if I run it right after it runs thru and finishes. What should I look for?

    Thank you

    Steve

    Wednesday, August 20, 2008 1:54 PM
  • Your “command timeout” is expiring. If you are using VB6, my guess is you are accessing SQL Server through ADO. Correct? In ADO you set that timeout value through Command.Timeout. You cannot set it through the connection string.

     

    You seem to be using MSDASQL as an ADO provider. Have you tried SQLOLEDB? Was there any performance difference?

     

    Zlatko Michailov

    Program Manager, SQL Server Connectivity

    Microsoft Corp.

     

    If you are satisfied by this post, please mark it as “Answer”.

    Wednesday, August 20, 2008 5:06 PM
  • That was it, Thank you very much.

    Wednesday, August 20, 2008 7:35 PM
  • I am having the same problem. After 5-6 days of operation all on a sudden all most each client end see the same message "Query Timeout Expired". But I got a strange solution. When my user let me know the problem, I just stop the SQL server service and start it. Then the system works. I want to get rid of this problem permanently.
    Monday, December 23, 2013 7:11 AM