Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Simple ASP error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Simple ASP error

 Post Reply Post Reply
Author
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Post Options Post Options   Thanks (0) Thanks(0)   Quote KCWebMonkey Quote  Post ReplyReply Direct Link To This Post Topic: Simple ASP error
    Posted: 15 July 2003 at 8:25am

I'm pretty sure that i can't figure this out because i've been staring at it for too long...

 

ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/dcsp/dccs/design/dbTest_update.asp, line 12

 

<% OPTION EXPLICIT%>
<%
 dim adoCon, SQL_query, RSpeople, dbFilePath, recordNum

 recordNum = CLng(Request.QueryString("ID_num"))
 dbFilePath = Server.MapPath("../_dbs/dbTest97.mdb")
 
 Set adoCon = Server.CreateObject("ADODB.Connection")
 adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & dbFilePath & ";"
 Set RSpeople = Server.CreateObject("ADODB.Recordset")
 SQL_query = "SELECT People.* FROM People WHERE ID_num=" & recordNum
 RSpeople.Open adoCon, SQL_query
%>



Edited by KCWebMonkey
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 15 July 2003 at 9:23am

change the line below
recordNum = CLng(Request........
to
recordNum = CInt(Request........

I am sure that your ID field is a standard number field so Long Datatype gives you a mismatch.

Back to Top
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Post Options Post Options   Thanks (0) Thanks(0)   Quote KCWebMonkey Quote  Post ReplyReply Direct Link To This Post Posted: 15 July 2003 at 12:23pm

Thanks Michael. got it fixed...not sure if that was the problem though cause i changed a few other things too...

Question:

on the line that states "RSpeople.Open adoCon, SQL_query", does it matter which order they are in?

ex: RSpeople.Open adoCon, SQL_query or RSpeople.Open SQL_query, adoCon



Edited by KCWebMonkey
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 15 July 2003 at 2:39pm
I think it does matter, never tried the 2nd example though.
Back to Top
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post Posted: 16 July 2003 at 7:20am
Originally posted by KCWebMonkey KCWebMonkey wrote:

does it matter which order they are in?

Certainly does.  (Wouldnt' be hard to test though would it...)

Cheers,
Andrew

There have been many, many posts made throughout the world...
This was one of them.
Back to Top
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Post Options Post Options   Thanks (0) Thanks(0)   Quote KCWebMonkey Quote  Post ReplyReply Direct Link To This Post Posted: 16 July 2003 at 10:35am
ok then, that's what i had in the wrong order...  still learning...
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.