Print Page | Close Window

Access Database ASP Error

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=10800
Printed Date: 30 March 2026 at 12:10pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Access Database ASP Error
Posted By: gr8indianbear
Subject: Access Database ASP Error
Date Posted: 09 June 2004 at 11:19am

I get this error on my page:

error '80004005'

/main.asp, line 68

i recently changed the table structure of my database and changed my SQL strings to match them. when i uploaded the page and the database i got the above error. I have set full permissoins on my database this is the code snippet:

<%

'set DB properties and connections 
Server.ScriptTimeout = 90
Session.Timeout = 20
Session.LCID = 1033
 
Set adoCon = Server.CreateObject("ADODB.Connection")
strDBPath = Server.MapPath("*****.db")

strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & strDBPath

adoCon.connectionstring  = strCon

adoCon.Open

Set rsCommon = Server.CreateObject("ADODB.Recordset")

'open DB and count number of articles in tblArticles
strSQL = "SELECT Count(ID) AS countAll "
strSQL = strSQL & "FROM gfaith "
strSQL = strSQL & "WHERE Section='" & strSection & "';"

rsCommon.Open strSQL, adocon

intCount = CInt(rsCommon("countAll"))

rsCommon.Close
>%




Replies:
Posted By: Semikolon
Date Posted: 09 June 2004 at 3:54pm
could you please post the full error? noone knows all the error codes by heart you know..

and what is your line 86?


Posted By: dpyers
Date Posted: 09 June 2004 at 4:21pm
Highlighting line 68 would probably help as well.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: gr8indianbear
Date Posted: 09 June 2004 at 7:12pm

that is the full error. nothing mroe specific than that appears.

line 68 is "rsCommon.open strSQL, adoCon"

sorry i didn't identify line 68 earlier. the page is http://www.gentlefaith.com/main.asp?section=articles - http://www.gentlefaith.com/main.asp?section=articles

in the querystring, 'section' is read into strSection



Posted By: dpyers
Date Posted: 09 June 2004 at 10:07pm

Usually an 80004005 error has more info. Typically it means something can't be accessed or can't be found.

Toss in a couple of response.writes to verify strCon and strSQL. You may also want to take a look at what's in strSection to ensure that no special characters are in there that might screw up the SQL.



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: gr8indianbear
Date Posted: 10 June 2004 at 8:01pm

PROBLEM SOLVED!

i guess the word Section is a reserved word wither in SQL or VBScript or something. it did not like that my field was named 'Section' and resulted in the error that i got. i changed it to a new name and it works fine now



Posted By: dpyers
Date Posted: 11 June 2004 at 12:17am
I hate it when it turns out to be something like that

-------------

Lead me not into temptation... I know the short cut, follow me.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net