i.e you can't do it purely in DAO - at least, that I am aware of. The trick is to open an ADO connection to the DB as per the hint above, leaving that connection open, and then doing your subsequent work through DAO
DAO already uses by default Page level locking, either pessimistic which is as soon as a record goes into the edit mode, or optimistic, only when the record update is actually being committed.
You are looking for optimistic locking in multi-user usage.
So, if you really meant Row level locking, then do as strongm says. You do not need any big changes, just one connection object along side of your DAO:
Yes, and not supported through the DAO 3.6 interface to the JET 4 dbms, which is the same engine used by the OLEDB JET 4 Provider supporting it.
Therefore, using the method mentioned by strongm and MS works, because it is not DAO or ADO implenting the locks, but JET 4, where the fuctionality was built into.
I am just not sure, because I never tested it, that if the database is still prior JET 4 format, but accessed through JET 4, if row locks will still work.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.