smjc96
smjc96

Reputation: 13

How to handle DMLs properly in local MS Access Tables/database with VBA

I'm trying to build a small application with VBA and forms on Access and I would like to make it somewhat failureproof.

I've been playing around with DAO objects and its members the simple way: literal string DMLs, .OpenRecordset method, looping through the returned rows, .Edit and .Update, et cetera. But looking around the net I found forum posts and guides that make use of DBEngine.Workspaces and its transaction methods and also .QueryDefs instead of .Execute for stored queries (either way just a select, insert or update).

My intention is just to manipulate the tables contained in the already open Access database itself. No external resources, whatever they might be like Oracle, MySQL or another Access file, and be able to rollback in case of failure, avoiding to insert invalid data.

Is all that really needed to achieve it? And if it is important, what's the best way to do it/where could I find complete and well explained reference material?

Upvotes: 0

Views: 48

Answers (0)

Related Questions