selahlynch
Registered User.
- Local time
- Today, 22:00
- Joined
- Jan 3, 2010
- Messages
- 63
I am importing large datasets into my database from text files.
I would like to add records in a manner so that if they are new, a record is inserted, but if they duplicate of one of my unique indexes, they update the existing record.
In MySQL I run the following query for each record and it works great.
In Access I've been using DAO.RecordSet functions.
But this seems to be too slow.
Does anybody have any ideas about how I could improve this process in Access?
I would like to add records in a manner so that if they are new, a record is inserted, but if they duplicate of one of my unique indexes, they update the existing record.
In MySQL I run the following query for each record and it works great.
Code:
INSERT INTO tablename ..... ON DUPLICATE KEY UPDATE ....
Code:
rs.FindFirst (matchcriteria)
If rs.NoMatch Then
rs.AddNew
Else
rs.Edit
End If
Does anybody have any ideas about how I could improve this process in Access?