Print Page | Close Window

Simple ASP error

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=4258
Printed Date: 30 March 2026 at 6:30am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Simple ASP error
Posted By: KCWebMonkey
Subject: Simple ASP error
Date 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
%>




Replies:
Posted By: michael
Date 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.



-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: KCWebMonkey
Date 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



Posted By: michael
Date Posted: 15 July 2003 at 2:39pm
I think it does matter, never tried the 2nd example though.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Bunce
Date 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.


Posted By: KCWebMonkey
Date Posted: 16 July 2003 at 10:35am
ok then, that's what i had in the wrong order...  still learning...



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