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

Home -> Community -> Usenet -> c.d.o.misc -> VB4 / Oracle / DataControl / Error 3020

VB4 / Oracle / DataControl / Error 3020

From: Tim Romano <tim_at_ot.com>
Date: 1997/06/08
Message-ID: <01bc7447$2acc1890$7df0eac7@haven>#1/1

While the VB4 datacontrol works okay with Oracle if its VCR keys are used, I cannot get the datacontrol to work as an object in my VB code using the DAO methods interface.

This code works:

Dim RS as Recordset, DB as Database
Set DB = mydatacontrol.database
Set RS = DB.OpenRecordset(myAttachedOraTableName, dbOpenDynaset) RS.AddNew

RS("ID") = 1000
RS("FIRSTNAME") = "Tom"
RS("LASTNAME") = "Terrific"

RS.Update

But this code fails with error 3020; "Update or CancelUpdate without AddNew or Edit":

mydatacontrol.recordset.AddNew
mydatacontrol.recordset("ID") = 1000
mydatacontrol.recordset("FIRSTNAME") = "Tom"
mydatacontrol.recordset("LASTNAME") = "Terrific"
mydatacontrol.recordset.update   ' this line fails with error 3020

NOTE: I'm sure the AddNew method is being invoked because I step through the code one line at a time and watch it happen. Also, the dbeditmode is indeed dbEditAdd when I test that property.

The context of the code above is: I've set the data control to be invisible so that I can replace its VCR-keys interface with my own command buttons. It should be easy to do, but may well be impossible, I hear, when attached Oracle tables are involved.

I can do this without using the edit control but I can save a lot of time -- in the long run -- if I could use the data control and bound controls.

Kindly cc me at tim_at_ot.com if you respond to the list.

Thanks
Tim Romano
Swarthmore PA Received on Sun Jun 08 1997 - 00:00:00 CDT

Original text of this message

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