473,320 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Any way to stop MS access getting locked…

Joe
Hi,

I am using MS Access DB in the backend of an ASP.NET login page. The DB is
small and has only two tables. I have noticed that besides using close() on
OleDBDataReader and OleDbConnection object, this database gets locked (.ldb
file). Religiously I use close() after I am done with the existing
connection. I was wondering if there is any way to prevent it from locking
up.

Thanks,

Joe

Nov 18 '05 #1
3 1596
The .ldb file is created when the database is being accessed. If you've
graphically made your connection to Access (using the Server Explorer
window), then even though your code is done using the db, VS.NET continues
to use it. Also, ADO.NET uses connection pooling, so even when you close
your connection and it falls out of scope, it still exists in the connection
pool. If you add: OLEDB Services=-4 to your connection string, you can
indicate that you don't want to use connection pooling.

"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:0C**********************************@microsof t.com...
Hi,

I am using MS Access DB in the backend of an ASP.NET login page. The DB is
small and has only two tables. I have noticed that besides using close()
on
OleDBDataReader and OleDbConnection object, this database gets locked
(.ldb
file). Religiously I use close() after I am done with the existing
connection. I was wondering if there is any way to prevent it from locking
up.

Thanks,

Joe

Nov 18 '05 #2
Joe
Thanks Scott, I will try it.

"Scott M." wrote:
The .ldb file is created when the database is being accessed. If you've
graphically made your connection to Access (using the Server Explorer
window), then even though your code is done using the db, VS.NET continues
to use it. Also, ADO.NET uses connection pooling, so even when you close
your connection and it falls out of scope, it still exists in the connection
pool. If you add: OLEDB Services=-4 to your connection string, you can
indicate that you don't want to use connection pooling.

"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:0C**********************************@microsof t.com...
Hi,

I am using MS Access DB in the backend of an ASP.NET login page. The DB is
small and has only two tables. I have noticed that besides using close()
on
OleDBDataReader and OleDbConnection object, this database gets locked
(.ldb
file). Religiously I use close() after I am done with the existing
connection. I was wondering if there is any way to prevent it from locking
up.

Thanks,

Joe


Nov 18 '05 #3
Also, you may try Dispose instead of Close

jeff
"Joe" <Jo*@discussions.microsoft.com> wrote in message
news:0C**********************************@microsof t.com...
Hi,

I am using MS Access DB in the backend of an ASP.NET login page. The DB is
small and has only two tables. I have noticed that besides using close() on OleDBDataReader and OleDbConnection object, this database gets locked (.ldb file). Religiously I use close() after I am done with the existing
connection. I was wondering if there is any way to prevent it from locking
up.

Thanks,

Joe

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: deko | last post by:
I have a sub routine that searches the Outlook PST for a message sent to/from a particular email address. Obviously, this can take a long time when the PST contains thousands of messages. I'd...
45
by: StopThisAdvertising | last post by:
Hi there, We all know Steve Santos. He *really* is an advertising and job-hunting machine. A lot of us have asked him *many* times and in different ways to stop his blatant advertising. This has...
8
by: Matt Theule | last post by:
While stepping through an ASP.NET project, I found that data was being inserted into my database even though I was not stepping through the code that inserted the data. I have a single page with...
8
by: carriolan | last post by:
Hi I have an MS Access based application almost ready for distribution to the public and I find that even though I have compiled it into an MDE file, tables and queries can still be be imported if...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.