classic asp ADO timeout problem with OleDB but ok with ODBC

  • Hi folks,

    I've got a strange problem :

    We use a classic asp web site which deals with an SQL Server 2012 database.

    1°- using this connexion string "Driver={SQL Server};Server=xxx;UID=uuu;PWD=ppp;Database=ddd"

    I can without problem run a Stored proc which lasts more or less 1 minute long.

    I use for this to run fine the CommandTimeout property of the ADODB.Command object set to a value of 120 (secondes).

    2° When switching to this connexion string "Provider=SQLOLEDB; Data Source=xxx;Initial Catalog=ddd;Application Name=aaa;User Id=uuu; Password=ppp" the page give a timeout error (err = 80040e31) after a 30 secs delay.

    Seems like the Command.CommandTimeout is ignored :/

    Anyone already has a similar experience ?

    PS : just to test, please use this kind of procedure :

    CREATE PROCEDURE UP_TEST as

    set NOCOUNT ON

    WAITFOR DELAY '000:00:40'

    SELECT '40 Second Delay'

    PS2 : I've also specified the ADODB.Connection.connectiontimeout at a value of 120...

  • i think you also need to set connectiontimeout as well.

    Each object can have it's own time timeout: SQLBulkCopy , SQLCommand, and SQLConnection all have seperate timeouts, for example.

    so if you used all three, you might need to set each one explicitly.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Hi Lowell,

    Which 3 items do you mean ?

    I've used :

    Connection.connectionTimeout = 120

    Command.CommandTimeout = 120

    Third one ?

    Thks in advance ^^

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply