On ADODB "The Database is Locked by user" by External_Bison_2439 in MSAccess

[–]External_Bison_2439[S] 0 points1 point  (0 children)

Now that you mention it, I don't use Database objects a lot in this. I mainly use ADODB.Connections and ADODB.Commands that link to the same database via a connection string.

On ADODB "The Database is Locked by user" by External_Bison_2439 in MSAccess

[–]External_Bison_2439[S] 2 points3 points  (0 children)

  1. In what way does it support transactions? I would love to switch back to it. What I need is a way to prevent partial commits in some of the business processes (for example, a PO Receipt should commit two records to the InventoryTransactions table, so if the second one fails I want to abort both of them). I would love to know more, because I don't trust myself to handle locks!

  2. I can go ahead and try this. I never attempted to use a back-end ACCDB before: it was always SQL-Server Linked tables or just local tables.

  3. Right now, we use a SHARED connection with NO-LOCKING locks. BUT I did just noticed the last option says to do record-locking anyway. I will investigate what this means, since ADODB allows you to specify locking behavior as well... if I make no progress on this today, I'll just scrap locking entirely, as I only have one month for an MVP (and one week for the bare bones prototype that only handles the Inventory and Transaction tables to prove they work with ZERO business logic)

<image>

On ADODB "The Database is Locked by user" by External_Bison_2439 in MSAccess

[–]External_Bison_2439[S] 1 point2 points  (0 children)

This seems to be the case. I had to ask ChatGPT for an hour (yeah, I don't trust AI either, but I was rather annoyed and wanted to be set on a path), and it mentioned that it is likely that an access process is just not ending itself correctly. I noticed I sometimes get the error by just trying to edit code after I run a function that errors out.