Timeout expired while retrieving data from table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mabubakarpk
    New Member
    • Feb 2007
    • 62

    Timeout expired while retrieving data from table

    Hello to all

    I am using an application which is in vb6.0 and database in MSSQL server 2k.
    I am using connection string through ADO.
    Some times I receive message Timeout expired when I retreive data from table e.g
    Vendor (Select * from Vendor) through vb6.0 application .

    When I retreive data from table through SQL Server enterprise manager It
    also generate Timeout expired message.

    For the time being to get rid this error I restart database server or
    Kill the ProcessID through MSSQL Server enterprise manager
    Management->Current Activity->Process Info.

    Please advice why this error come and how I can get rid this error through proper channel.

    Note : Vendor table is not more than 500 rows.



    Thanx in advance
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    This problem is becasue it is taking too long to establish the connection from VB to SQLServer.

    You need to set the Connection.Conn ectionTimeout property in VB6.0

    Comment

    • mabubakarpk
      New Member
      • Feb 2007
      • 62

      #3
      Originally posted by debasisdas
      This problem is becasue it is taking too long to establish the connection from VB to SQLServer.

      You need to set the Connection.Conn ectionTimeout property in VB6.0
      Thanx dear for reply

      I have also set connection.conn ectionTimeout property but why same error come when I reterieve data from MSSQL Server enterprise talble return all rows. while table contains only 500 rows

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        It does not matter what is the number records that you are trying to retrive. It depends what is the time taken to establish the connection. It depends on alot of factors like network speed and also hardware.

        Comment

        • davef
          New Member
          • Sep 2007
          • 98

          #5
          Originally posted by debasisdas
          It does not matter what is the number records that you are trying to retrive. It depends what is the time taken to establish the connection. It depends on alot of factors like network speed and also hardware.
          Since you seem to get a timeout error even via the console, check out whether you have any locks on the table.

          Comment

          Working...