Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004
    Posts
    3

    Unanswered: Slow query; timeout after 30 seconds

    Hello there,

    I am programming with visual basic and I have a large query wich takes too long for execution. After 30 seconds I get a timeout error.

    Is there any way to raise the timeout to 90 seconds or something.

    I'm using the following connection string to connect to the database.

    Provider=SQLOLEDB.1;Connect Timeout=2;Password=****;Persist Security Info=True;User ID=user;Initial Catalog=test;Data Source=sqlserver

    thank you

  2. #2
    Join Date
    Jun 2003
    Posts
    31
    Sure, in the SQL Server's Properties & Connection tab, under the "Remote server connections", change the "Query time-out" from a default of 600 to whatever you needed.

  3. #3
    Join Date
    Aug 2004
    Posts
    3
    I changed the default time-out (600) to zero (0) but there are still time-outs. I re-checked the configuration and the running values gave 0 for query time-out.

    Could this still be an MSSQL time-out or has this something to do with my Visual Basic program?

  4. #4
    Join Date
    Aug 2004
    Posts
    8
    Is this VB6 or VB.NET? If it's the latter, you need to set the timeout on your SqlCommand object.
    If it's the former, I've got no clue

  5. #5
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    QueryTimeout or CommandTimeout
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

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