Joe,
I have a little program the writes to an access.mdb file from an ASP.NET
page. If it is creating the .ldb file (the lock file), it is happening so
fast I don't even see it.
Here is my code that works. I am not even calling dispose on my connection
object.
Try
cn.Open()
cmd.ExecuteNonQuery()
Catch ex As Exception
ErrorAlert("An error occured saving to database. Please try
again.")
Trace.Warn(ex.ToString)
Return
Finally
cn.Close()
End Try
Are you successfully inserting the record at all? If not, maybe ASPNET user
doesn't have modify rights to the folder the .mdb resides in.
I just tried renaming the .mdb immediately after running my program, and it
let me do it. (no lock by IIS or anything)
Bottom line: while Access on a web server is not a good idea (everybody can
stop typing now!), it should not be behaving the way it is for you...
HTH,
Greg
"Joe" <Jo*@joe.com> wrote in message
news:eD**************@TK2MSFTNGP10.phx.gbl...
Hi,
I have an asp.net page that opens up a connection to MS access DB and does
insert into DB. I am using close() and setting the connection object to
Nothing after I am done with inserting a record. After inserting when I look
at the server where the MS access DB resides I also see a *.ldb file also.
For some reason I cannot get rid of this *.ldb file even after I close the
connection to DB from my asp.net page. As long as this *.ldb file is there
I cannot overwrite /rename/move this MS Access DB. The only way I can get
rid of this *.ldb file is by restarting the IIS which is not a good
solution. Can anyone give me an idea if I am doing something wrong or how to get rid
of this *.ldb file? Thanks,
Joe
___
Newsgroups brought to you courtesy of www.dotnetjohn.com