Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Location
    New York, NY
    Posts
    136

    Unanswered: time out problem

    Hi,

    I am using a stored procedure to delete some tables that have huge data in them. This stored procedure when run on a query analyzer runs fine but when made to run using a activex script (which i need to use inside a dts package) gives a time out error. here is the active x
    ===============================================
    option explicit

    Function Main()
    Const adOpenKeyset = 1
    dim myConn, gFilePath, Fso, deleteSQL
    gFilePath = DTSGlobalVariables("gPathFol").Value
    Set Fso = CreateObject("Scripting.FileSystemObject")
    Main = DTSTaskExecResult_Success
    If (Fso.FileExists(gFilePath & "\CoreLoadEnd.trg")) Then
    else
    set myConn = CreateObject("ADODB.Connection")
    myConn.Open = "Provider=SQLOLEDB.1;Data Source='server_name'; Initial Catalog=DBNAME; user id = 'username' ; password = 'password'"
    deleteSQL = "exec USP_DeleteTables"
    myConn.execute deleteSQL
    End If
    End Function
    ===========================================

    can anything be done about it?

    Thanks a lot

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    The default value for CommandTimeout property of the connection object is 30 seconds. I presume the procedure runs a little longer, so you need to change this value appropriately befor doing Open on the connection.

  3. #3
    Join Date
    Sep 2003
    Location
    New York, NY
    Posts
    136
    great, thanks for your help.

Posting Permissions

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