Hi,
I am writing a program that updates both an Access table and an Oracle table every time a new record is entered or something changes. Having trouble writing to Oracle table from Access. Anyone know how? I am trying :
Dim wrkJet As Workspace
Dim wrkODBC As Workspace
Dim db As DAO.Database
Set db = CurrentDb()
Dim con As DAO.Connection
Dim od As Workspace
Dim rs As DAO.Recordset
Set wrkJet = CreateWorkspace("", "admin", "", dbUseJet)
Set wrkODBC = CreateWorkspace("", "admin", "", dbUseODBC)
Set con = wrkODBC.OpenConnection("", , False, _
"ODBC;DATABASE=;UID=LAW;PWD=GARY;DSN=LawDB")
' bring current data from the Oracle tables into the Access tables for searching or new record creation
'Set od = OpenDatabase(con)
'Set rs = con.OpenRecordset("SELECT * FROM COMPLAINTS", dbOpenDynaset)
On my insert, I don't know what to put for the object. I tried
con.execute " insert etc"
This gives ODBC- call failed" as an error
I also tried the addnew, update method but it gives "Can't update. Database is Read Only". But it isn't.
Thanks for any help
I am writing a program that updates both an Access table and an Oracle table every time a new record is entered or something changes. Having trouble writing to Oracle table from Access. Anyone know how? I am trying :
Dim wrkJet As Workspace
Dim wrkODBC As Workspace
Dim db As DAO.Database
Set db = CurrentDb()
Dim con As DAO.Connection
Dim od As Workspace
Dim rs As DAO.Recordset
Set wrkJet = CreateWorkspace("", "admin", "", dbUseJet)
Set wrkODBC = CreateWorkspace("", "admin", "", dbUseODBC)
Set con = wrkODBC.OpenConnection("", , False, _
"ODBC;DATABASE=;UID=LAW;PWD=GARY;DSN=LawDB")
' bring current data from the Oracle tables into the Access tables for searching or new record creation
'Set od = OpenDatabase(con)
'Set rs = con.OpenRecordset("SELECT * FROM COMPLAINTS", dbOpenDynaset)
On my insert, I don't know what to put for the object. I tried
con.execute " insert etc"
This gives ODBC- call failed" as an error
I also tried the addnew, update method but it gives "Can't update. Database is Read Only". But it isn't.
Thanks for any help