Access Database locked on server?
I have an asp.net application running on a server... (www.skint.co.za) please excuse the graphics, it is very much in test stage.
My problem is that i have to use an access database as opposed to the usual SQL server.
The program runs all fine and well, except that after the first "write" call to the server datdabase, the server puts a lock on the file (.ldb). This is very annoying, as the lock even locks the application itself from writing, and the site goes into a read-only state, meaning i cannot upload any information!
Surely the lock should be user specific and the application on the server should be able to write to the db?
Any ideas anyone?
Re: Access Database locked on server?
How are you opening the db? Are you closing the connection properly, if you are not closing the connection then the lock wont go away..
Re: Access Database locked on server?
Ok, the problem has morphed somewhat.
To answer your question, after i open a connection, it is closed every time at the end of the procedure (even though only 2 or three procedures open a conn to the db), as well as in the catch statement in case of an error.
It seems now that when i run the application on the local machine, everything is fine, but when i send it to the server, nothing will write to the database. All my information stays in my collections, and when the colleciton dissapears, there goes all my data.
I took all the try catch statements out hoping to find an error when the system wrote to the database, but nothing, no errors fire when updating the database... even though nothing writes to the db!
I thought that maybe i could have put the mdb file in the wrong location, but that can't be, because i can still read from it.
This is a first for me.
Re: Access Database locked on server?
One thing to check is that the ASP.NET worker process has write permission for the directory that the Access database is in.
DJ