Results 1 to 2 of 2

Thread: Timeout expired

  1. #1
    Join Date
    Apr 2004

    Post Unanswered: Timeout expired


    when I try to perform a SELECT statement against a view with Enterprise
    Manager or with a VB 6.0 application, I get the following message:
    [Microsoft][ODBC SQL Server Driver] Timeout expired.

    This appaers only on one view!!!

    All other queries work withpout any problems.

    The SELECT Statement works on the Query Analyzer.

    Can anybody help ?

    Thanks on advance

  2. #2
    Join Date
    Aug 2004

    Vb6 settings that solved my problem ...


    Enterprise manager should timeout around 30s whatever you do ...

    Query analyser does not, and it seems you don't have problem with QA at all anyway

    If you are accessing data in your VB6 application thru ADODB objects, i suggest the following settings :

    MyADODBConnection.ConnectionTimeout = 60
    MyADODBConnection.CommandTimeout = 600
    MyADODBCommand.CommandTimeout = 600

    MyADODBCommand.ActiveConnection = MyADODBConnection
    MyADODBCommand.CommandText = "my sql statements"

    Put more if you need more ...

    You should check your execution plan on that view to see why thi select is taking so long (maybe there are some indexes you can use ...).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts