468,170 Members | 2,046 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,170 developers. It's quick & easy.

Error: The process cannot access the file ".mdb" because it is being used by another process.

Hi,
I use ADOX to create a Access database programmatically from my asp.net
application
and save ".mdb" file to a temp folder under my project foler on the web

server. After database is created successfuly, I saw two files ".mdb"
and ".ldb" in my temp folder. I have no problem to open the database
manually. But when I'm tring to use Response.WriteFile() to download
database file to end user's local machine, I kept getting the following

error message - "The process cannot access the file ".mdb" because it
is being used by another process."
Any help is highly appreciated.

thanks

Nov 19 '05 #1
2 2671
Well, If you see ldb file that means connection to DB is open.

Did you explicity closed the connection? Or that ADOX object.
Probably not

George.

"lucy" <yo****@profitecinc.com> wrote in message news:11**********************@z14g2000cwz.googlegr oups.com...
Hi,
I use ADOX to create a Access database programmatically from my asp.net
application
and save ".mdb" file to a temp folder under my project foler on the web

server. After database is created successfuly, I saw two files ".mdb"
and ".ldb" in my temp folder. I have no problem to open the database
manually. But when I'm tring to use Response.WriteFile() to download
database file to end user's local machine, I kept getting the following

error message - "The process cannot access the file ".mdb" because it
is being used by another process."
Any help is highly appreciated.

thanks

Nov 19 '05 #2
Thank you very much for your response. I use try...catch..finally in my
source code. And in finally block I set cat.ActiveConnection = Nothing

cat = Nothing
where cat is adox object.

What else am I missing?

thanks

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Henrik | last post: by
2 posts views Thread by Homer J. Simpson | last post: by
9 posts views Thread by tshad | last post: by
reply views Thread by gcreed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.