Results 1 to 3 of 3

Thread: TimeOut Expired

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Posts
    2

    Angry

    I have a vb application making use of a com dll to make connections to the database and executing stored procedures. one of the classes that i am using has a method which uses disconnected ado recordsets to return back the results after executing the stored procedure. i am getting an error timeout expired when executing a particular stored procedure. The Stored procedure is very complicated and data returned is also huge so it gives me an error only when the data returned back is huge say for 34000 records. i have also tried to increase the connection timeout to 360 but does not help. What could be the problem? here is my code...
    Set cnnSupplierItems = CreateObject("ADODB.Connection")
    Set rsSuppItems = CreateObject("ADODB.Recordset")
    cnnSupplierItems.ConnectionTimeout = 360
    cnnSupplierItems.Open "File Name=" & App.Path "\ESCatalog_datasource.udl"

    strSQL = "{call sp_findsupplieritem("
    strSQL = strSQL & "'" & Utility.RemoveSingleQuote(Trim(strSupplierItemNumber)) & "', "
    ..... builds the whole strsql string

    rsSuppItems.CursorLocation = adUseClient
    rsSuppItems.Open strSQL, cnnSupplierItems, adOpenDynamic, , adAsyncExecute

    Do While (rsSuppItems.State = adStateExecuting) ...> 'goes to timeout error after a minute or so
    Loop
    any help would be appreciated
    Thanks

    Arati

  2. #2
    Junior Member
    Join Date
    Mar 2001
    Posts
    23
    Get rid of the Loop.

    The stored Procedures are treated as in-process code so while retrieving the recordset it should not carry on running further code

  3. #3
    Lively Member
    Join Date
    Jan 2000
    Posts
    65

    hi Arti, I have a question about using COM Dlls for Database connection

    hi Arti,
    I am new to using COM objects.. what is the advantage of using COM Dll from VB to call stored procedures .. Is there any problem calling the
    stored procedures from VB or ASP directly using ODBC
    DSN ?
    Do you recommend any sites that has more information
    on creating DataBase connection Dlls and precautions to be taken while doing it..
    thanks
    sarath

Posting Permissions

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



Click Here to Expand Forum to Full Width