Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Arguments are of the wrong type
I'm getting the following error:

ADODB.Recordset error '800a0bb9'

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

/shop/results.asp, line 15

line 15 is the recordset open line. Can someone please help

if isnull(session("whois")) then
response.Redirect("../default.asp")
else
getCon=Application("connectionObject")
set objshop=server.CreateObject("adodb.recordset")
dim categoryid
categoryid = request.querystring("cat")
objshop.open "select * from tblproducts where catkey = " & categoryid &"
order by catkey",getcon,3,3

Report this thread to moderator Post Follow-up to this message
Old Post
Erica
10-27-04 01:55 AM


Re: Arguments are of the wrong type
<%
categoryid = request.querystring("cat")
RESPONSE.WRITE "select * from tblproducts where catkey = " & categoryid &"
order by catkey"
RESPONSE.END
%>

Load that.  Does your query look right?  If so, open up tool for running
queries against your database and try running it.  You didn't indicated what
database type you're using, so if this is SQL, use Query Analyzer.  Access,
the query editor window, etc.

Ray at work



"Erica" <Erica@discussions.microsoft.com> wrote in message
news:342FA7DD-1C95-44B3-8870-997B8973A430@microsoft.com...
> I'm getting the following error:
>
> ADODB.Recordset error '800a0bb9'
>
> Arguments are of the wrong type, are out of acceptable range, or are in
> conflict with one another.
>
> /shop/results.asp, line 15
>
> line 15 is the recordset open line. Can someone please help
>
> if isnull(session("whois")) then
> response.Redirect("../default.asp")
> else
> getCon=Application("connectionObject")
> set objshop=server.CreateObject("adodb.recordset")
> dim categoryid
> categoryid = request.querystring("cat")
> objshop.open "select * from tblproducts where catkey = " & categoryid &"
> order by catkey",getcon,3,3



Report this thread to moderator Post Follow-up to this message
Old Post
Ray Costanzo [MVP]
10-27-04 01:55 AM


Re: Arguments are of the wrong type
The sql statement is correct. I am using Access database.

"Ray Costanzo [MVP]" wrote:

>
> <%
> categoryid = request.querystring("cat")
> RESPONSE.WRITE "select * from tblproducts where catkey = " & categoryid &"
> order by catkey"
> RESPONSE.END
> %>
>
> Load that.  Does your query look right?  If so, open up tool for running
> queries against your database and try running it.  You didn't indicated wh
at
> database type you're using, so if this is SQL, use Query Analyzer.  Access
,
> the query editor window, etc.
>
> Ray at work
>
>
>
> "Erica" <Erica@discussions.microsoft.com> wrote in message
> news:342FA7DD-1C95-44B3-8870-997B8973A430@microsoft.com... 
>
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Erica
10-27-04 08:55 AM


Re: Arguments are of the wrong type
You verified that it is correct by copying and pasting that exact query and
running it in the Access query window?

Ray at home

"Erica" <Erica@discussions.microsoft.com> wrote in message
news:9F2E2568-FFF4-40B9-8D8E-1E6FF8E58910@microsoft.com...
> The sql statement is correct. I am using Access database.
>
> "Ray Costanzo [MVP]" wrote:
> 



Report this thread to moderator Post Follow-up to this message
Old Post
Ray Costanzo [MVP]
10-27-04 08:55 AM


Re: Arguments are of the wrong type
Yes, and the query worked perfect. Here is what I copied and pasted

select * from tblproducts where catkey = 1 order by catkey



"Ray Costanzo [MVP]" wrote:

> You verified that it is correct by copying and pasting that exact query an
d
> running it in the Access query window?
>
> Ray at home
>
> "Erica" <Erica@discussions.microsoft.com> wrote in message
> news:9F2E2568-FFF4-40B9-8D8E-1E6FF8E58910@microsoft.com... 
>
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Erica
10-27-04 08:55 AM


Re: Arguments are of the wrong type
Alright, what is "getcon" then?  Can you post that function?

Ray at home

"Erica" <Erica@discussions.microsoft.com> wrote in message
news:4772136E-64EF-4D13-9305-DBAE13EFCBCC@microsoft.com...
> Yes, and the query worked perfect. Here is what I copied and pasted
>
> select * from tblproducts where catkey = 1 order by catkey
>
>
>
> "Ray Costanzo [MVP]" wrote:
> 



Report this thread to moderator Post Follow-up to this message
Old Post
Ray Costanzo [MVP]
10-27-04 08:55 AM


Re: Arguments are of the wrong type
Ray,

First, thanks for your help. Second, 'getcon' is the connection object. The
strange thing is that this script worked fine and then all of sudden with no
warning it stopped working. I'm at a brick wall with this one. I've spent
almost 24 hours trying to figure this one ou t.

"Ray Costanzo [MVP]" wrote:

> Alright, what is "getcon" then?  Can you post that function?
>
> Ray at home
>
> "Erica" <Erica@discussions.microsoft.com> wrote in message
> news:4772136E-64EF-4D13-9305-DBAE13EFCBCC@microsoft.com... 
>
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Erica
10-27-04 08:55 AM


Re: Arguments are of the wrong type
"Erica" <Erica@discussions.microsoft.com> wrote in message
news:342FA7DD-1C95-44B3-8870-997B8973A430@microsoft.com...
> objshop.open "select * from tblproducts where catkey = " & categoryid &"

I don't understand the final bit: ... categoryid & "

Why append a double quote?  Surely that's neither needed nor correct, and
results in three double quotes in the line.  Remove the final &"




Report this thread to moderator Post Follow-up to this message
Old Post
Des Perado
10-27-04 01:55 PM


Re: Arguments are of the wrong type
your storing your connection object in an application variable? bad idea.

"Erica" <Erica@discussions.microsoft.com> wrote in message
news:3139948D-040A-4058-9C02-D38387C2C2CF@microsoft.com...
> Ray,
>
> First, thanks for your help. Second, 'getcon' is the connection object.
The
> strange thing is that this script worked fine and then all of sudden with
no
> warning it stopped working. I'm at a brick wall with this one. I've spent
> almost 24 hours trying to figure this one ou t.
>
> "Ray Costanzo [MVP]" wrote:
> 
query 
are 



Report this thread to moderator Post Follow-up to this message
Old Post
thorpe
10-27-04 01:55 PM


Re: Arguments are of the wrong type
How did you deduce that her connection object is being stored in an app
variable?  :]

Ray at work

"thorpe" <temp@tpg.com.au> wrote in message
news:O7uMqcBvEHA.1988@TK2MSFTNGP12.phx.gbl...
> your storing your connection object in an application variable? bad idea.



Report this thread to moderator Post Follow-up to this message
Old Post
Ray Costanzo [MVP]
10-27-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:01 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.