Home » Infrastructure » Windows » Update using data controls
Update using data controls [message #100616] Fri, 07 March 2003 11:10 Go to next message
s l
Messages: 4
Registered: February 2003
Junior Member
I'm working on a VB produced frontend designed to access a MSAccess db. Now I've moved over to an Oracle 9i db and can't seem to add new records. Heres' the code with added comments:

' DataEnvironment1 = DataEnvironment
' rsAllRecordsUsers = recordset

' Update db with data from form
DataEnvironment1.rsAllRecordsUsers.Update

' Using MSAccess, the recordset would now contain the
' primary keys generated by the db for the new record.
' Now determine primary keys for insertion as
' foreign keys

lngRecordNumber =
DataEnvironment1.rsAllRecordsUsers.Fields("records_id")

lngUserID = DataEnvironment1.rsAllRecordsUsers.Fields("users_id")

' Insert foreign keys into recordset
DataEnvironment1.rsAllRecordsUsers.Fields("records_id").Value = lngRecordNumber
DataEnvironment1.rsAllRecordsUsers.Fields("RecordOwner").Value = lngUserID

' Update record with foreign keys. Record should
' be complete.

DataEnvironment1.rsAllRecordsUsers.Update

But here is the problem, lngUserID and lngRecordNumber both contain 0, and the last update leaves rows with no foreign keys. Any ideas about what I'm missing or how I can fix this?

Thanks

Scott
Re: Update using data controls [message #101317 is a reply to message #100616] Wed, 04 August 2004 02:05 Go to previous message
f**ker
Messages: 1
Registered: August 2004
Junior Member
screw your self then your problem will be solved
Previous Topic: Couldn't install Oracle 8 on Win2k
Next Topic: Oracle Installation
Goto Forum:
  


Current Time: Fri Nov 22 08:27:21 CST 2024