Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> rs.Find() broken after txn rollback....

rs.Find() broken after txn rollback....

From: <johnt_at_tman.dnsalias.com>
Date: Mon, 28 May 2001 22:42:00 GMT
Message-ID: <YuAQ6.241$ld7.458185@typhoon.snet.net>

Hello, am I doing something wrong or is there a bug somewhere??

I am using the Oracle ADO driver (OraOLEDB.Oracle) v8.1.7.0.0 from VB, this is the problem:

1.) I open a recordset as such:

    Dim rs As New ADODB.Recordset
    <create connection here>
    rs.Open "FIRE_LOOKUP", conn, adOpenStatic, adLockOptimistic,

        adCmdTableDirect     

2.) Then, begin a xtn on the conn...

    conn.BeginTrans

3.) Add 1 record to the rs (it originally has about 12 records)...

   rs.AddNew
   rs.("COL1") = 123
   rs.("COL2") = "datadata"
   rs.Update

4.) ( Now if I iterate through the RS, I do see my new row. OK.)

5.) Now, rollback:

    conn.RollbackTrans

6.) (At no point did the new row show up on the DB itself. GOOD).

7.) (Now, if I iterate through the RS, I do not see the new row. GOOD.).

8.) BUT---> Here is the problem. If I do a Find on the RS, it will "find" a  record, but it will be pointing to the _wrong_ row. E.g. :

    rs.MoveFirst
    rs.Find "COL1 = 123"     

?rs.EOF

    False

?rs ("COL1")

    4

Huh? That should no be "4", but I would rather think it would set the RS to EOF because that row is not in the RS?

Am I doing something wrong here or is this a prob in MSADO or in the Oracle driver? Has anyone seen this before?

Thanks,
JT. Received on Mon May 28 2001 - 17:42:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US