Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > database connection

Reply
Thread Tools

database connection

 
 
John Doe
Guest
Posts: n/a
 
      09-28-2003
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.






 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      09-28-2003
John Doe wrote:
> 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




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
Database Connection - Not Associated With Trusted Connection Mythran ASP .Net 5 10-05-2005 10:50 PM
Re: Software Developer to transcribe Oracle database into Access database Fluker MCSD 0 07-09-2003 01:20 PM
Re: Software Developer to transcribe Oracle database into Access database Guy Cox MCSD 1 07-09-2003 08:07 AM



Advertisments