relax99 has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I ran into a concurrency problem with my Perl / CGI application. It uses a Microsoft Access database for data storage. I noticed that if I run a DELETE query and then a SELECT right after it, I get results that include the deleted records. If I insert sleep(1) command between the two database calls, I get the correct results. It seems to me that this behavior results from the way Access processes/caches query requests.
I am at the point where I think I need to lock the table to which I am doing the updates, but I am not sure how to do it using DBI module. I searched in groups.google.com, DBI documention and here, but couldn't find an answer. I know that Access is probably not a good choice for a multiuser application, but, if it all possible, I want to use Access initially and then switch over to something else (SQL Server or Oracle).
There's a way to lock records using ADO provider for Access, but I want to stick with DBI / ODBC for now. Could anyone give me any hints, comments, or pointers on this?
Thank you,
Alex
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: Locking tables in Access database using Perl DBI
by jeffa (Bishop) on Dec 03, 2002 at 16:29 UTC | |
by relax99 (Monk) on Dec 03, 2002 at 20:33 UTC |