Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Access Database ASP Error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Access Database ASP Error

 Post Reply Post Reply
Author
gr8indianbear View Drop Down
Groupie
Groupie


Joined: 07 November 2002
Location: United States
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote gr8indianbear Quote  Post ReplyReply Direct Link To This Post Topic: Access Database ASP Error
    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
>%

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
gr8indianbear View Drop Down
Groupie
Groupie


Joined: 07 November 2002
Location: United States
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote gr8indianbear Quote  Post ReplyReply Direct Link To This Post 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

in the querystring, 'section' is read into strSection

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
gr8indianbear View Drop Down
Groupie
Groupie


Joined: 07 November 2002
Location: United States
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote gr8indianbear Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.