database connection

J

John Doe

When I want to connect to my access database I do this :
set adoCon = server.CreateObject ("adodb.connection")
adoCon.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
Server.MapPath("******.mdb") & ";Persist Security Info=False"

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sqlstring, adoCon

This works fine, I do have one question though. If I have the access file
opend to for instance to add a record or something, if someone then try to
access the database through asp the user get's a white error page with the
text
"Error Type:
Microsoft JET Database Engine (0x80004005)
Could not use ''; file already in use.
/d042004/news.asp, line 55"

Is there a way that I still show my html page just without the asp stuff,
maybe add my own error message "Database down due to maintence. Please try
again" or something.
 
B

Bob Barrows

John said:
When I want to connect to my access database I do this :
set adoCon = server.CreateObject ("adodb.connection")
adoCon.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
Server.MapPath("******.mdb") & ";Persist Security Info=False"

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sqlstring, adoCon

This works fine, I do have one question though. If I have the access
file opend to for instance to add a record or something, if someone
then try to access the database through asp the user get's a white
error page with the text
"Error Type:
Microsoft JET Database Engine (0x80004005)
Could not use ''; file already in use.
/d042004/news.asp, line 55"

Is there a way that I still show my html page just without the asp
stuff, maybe add my own error message "Database down due to
maintence. Please try again" or something.

See this message:
http://tinyurl.com/oy5q
And these articles:
http://www.aspfaq.com/show.asp?id=2062 - updatable cursor
http://www.aspfaq.com/show.asp?id=2009 - 80004005 errors

HTH,
Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top