Hello,
I am coding on a vba program to load an XML file into an(other) access 2003 database.
I'm putting the data in 4 tables now, which worked fine until the 3rd table / AdoDB.Recordset.
On updating the 4th Recordset Im getting a very vague error. I already toggled all code that manipulated the table to comments, except filling in the primary key. So, basically nothing happens except .Open, .AddNew and . Update
On recordset.Update I'm getting the following error (1st line translated from Dutch):
"Error -2147217887 (80040e21) during execution:
Invalid Reference test code"
I can't see anything wrong with the code; it's similar to the other tables that worked fine. Unfortunately, Google didnt help me find any lead on the problem. Can anyone help/explain me what the error message should mean?
Here's a small code snippet:
Code:
Dim VisitID As Integer
VisitID = 21
'this is a simplified version for debugging; normally the ID comes from another table
Dim dbHFA As New ADODB.Connection
dbHFA.Provider = "Microsoft.Jet.OLEDB.4.0"
dbHFA.Open "hfa.mdb"
Dim tableThreshold As New ADODB.Recordset
tableThreshold.Open "Threshold_Test", dbHFA, adOpenDynamic, adLockPessimistic
tableThreshold.AddNew
tableThreshold("VISIT_ID").Value = VisitID
tableThreshold.Update
Thanks in advance!