Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004

    Unanswered: OLEDB Errors using MS Access and Disconnected Recordset

    Hello, Code below returns the following error:

    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done

    Const adLockBatchOptimistic = 4
    Const adUseClient = 3

    strDataBase = "somedb.mdb"

    set cnTraining = server.CreateObject("ADODB.Connection")

    cnnstr="Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=" & server.mappath(strDataBase) & ";Persist Security Info=False"

    cnTraining.Mode = 3
    cnTraining.Open cnnstr

    set rsSearch = Server.CreateObject("ADODB.Recordset")
    rsSearch.CursorLocation = adUseClient
    rsSearch.LockType = adLockBatchOptimistic

    sSql = "some sql stmt" 'this works fine on its own

    rsSearch.Open sSql, cnTraining

    set rsSearch.ActiveConnection = nothing

    set cnTraining = nothing


    My goal is to get a disconnected recordset. The problem here occurs when i try to use the adUseClient value (3) for the CursorLocation. If I don't use a 3 in the CursorLocation it works fine. Hoewever i'm almost certain i have to use the 3 in order to disconnect the recordset. Any ideas? Is my connection string not set up properly to get a disconnected recordset?

  2. #2
    Join Date
    Aug 2002
    You have to look at the errors collection of the connection object. The
    first error in that collection is the one you report here the other ones
    will give you more information about the reason(s).

    Assuming you don't have a disconnected recordset: Recordset.ActiveConnection.Errors collection

    KBA;EN-US;269495 for information.

    --Satya SKJ
    Microsoft SQL Server MVP

  3. #3
    Join Date
    Mar 2004
    I tried that and the errors collection only had the one error message in it as well. I'm using microsoft Access. I realize that this is a SQL Server forum but thought some might have experience.

Posting Permissions

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