Invalid Object name .... sometimes

  • Hello,

    I have been rattling my brain about this error message I keep getting about a dozen times a day:

    Cannot_Initialise_GetNextJob:_-2147217865_:_[Microsoft][ODBC_SQL_Server_Driver][SQL_Server]Invalid_object_name_'tcfgCprf'.,

    The error is a result of this code:

    Private Sub Class_Initialize()

        On Error GoTo errHandler

        

        Set cn = New ADODB.Connection

        Set rs = New ADODB.Recordset

       

        cn.Open "DSN=marf; UID=xxxxxx; PASSWORD=xxxxxx"

       

        Set rs.ActiveConnection = cn

        rs.CursorType = adOpenKeyset

        rs.LockType = adLockPessimistic

       

        strSQL = "SELECT tcfgRfNewOrderTime FROM tcfgCprf"

       

        rs.Open strSQL, cn, , , adCmdText

        end sub

       

    errHandler:

       

        Err.Raise vbObjectError + 10006, "mydllname", "Cannot Initialise GetNextJob"

    But this bit of code is executed hundreds of time a day.

    All i can find about this error message is about temp-tables, but the table tcfgCprf is not a temp table.

    The code is part of a dll that is used by an asp-page with about 20 concurrent users.

    Any ideas?

    Thanks.

    Peter Mellemans

     

  • Try providing the object database and owner.  The ADO connection may not be robust all the time to automatically go to the right place all the time

    Good Luck



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

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

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