By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,825 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

Arguments are of the wrong type

P: n/a
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
Jul 21 '05 #1
Share this Question
Share on Google+
15 Replies


P: n/a

<%
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" <Er***@discussions.microsoft.com> wrote in message
news:34**********************************@microsof t.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

Jul 21 '05 #2

P: n/a
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 what
database type you're using, so if this is SQL, use Query Analyzer. Access,
the query editor window, etc.

Ray at work

"Erica" <Er***@discussions.microsoft.com> wrote in message
news:34**********************************@microsof t.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


Jul 21 '05 #3

P: n/a
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" <Er***@discussions.microsoft.com> wrote in message
news:9F**********************************@microsof t.com...
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
what
database type you're using, so if this is SQL, use Query Analyzer.
Access,
the query editor window, etc.

Ray at work

"Erica" <Er***@discussions.microsoft.com> wrote in message
news:34**********************************@microsof t.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


Jul 21 '05 #4

P: n/a
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 and
running it in the Access query window?

Ray at home

"Erica" <Er***@discussions.microsoft.com> wrote in message
news:9F**********************************@microsof t.com...
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
what
database type you're using, so if this is SQL, use Query Analyzer.
Access,
the query editor window, etc.

Ray at work

"Erica" <Er***@discussions.microsoft.com> wrote in message
news:34**********************************@microsof t.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


Jul 21 '05 #5

P: n/a
Alright, what is "getcon" then? Can you post that function?

Ray at home

"Erica" <Er***@discussions.microsoft.com> wrote in message
news:47**********************************@microsof t.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:
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" <Er***@discussions.microsoft.com> wrote in message
news:9F**********************************@microsof t.com...
> 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
>> what
>> database type you're using, so if this is SQL, use Query Analyzer.
>> Access,
>> the query editor window, etc.
>>
>> Ray at work
>>
>>
>>
>> "Erica" <Er***@discussions.microsoft.com> wrote in message
>> news:34**********************************@microsof t.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
>>
>>
>>


Jul 21 '05 #6

P: n/a
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" <Er***@discussions.microsoft.com> wrote in message
news:47**********************************@microsof t.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:
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" <Er***@discussions.microsoft.com> wrote in message
news:9F**********************************@microsof t.com...
> 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
>> what
>> database type you're using, so if this is SQL, use Query Analyzer.
>> Access,
>> the query editor window, etc.
>>
>> Ray at work
>>
>>
>>
>> "Erica" <Er***@discussions.microsoft.com> wrote in message
>> news:34**********************************@microsof t.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
>>
>>
>>


Jul 21 '05 #7

P: n/a

"Erica" <Er***@discussions.microsoft.com> wrote in message
news:34**********************************@microsof t.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 &"

Jul 21 '05 #8

P: n/a
your storing your connection object in an application variable? bad idea.

"Erica" <Er***@discussions.microsoft.com> wrote in message
news:31**********************************@microsof t.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:
Alright, what is "getcon" then? Can you post that function?

Ray at home

"Erica" <Er***@discussions.microsoft.com> wrote in message
news:47**********************************@microsof t.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:

> 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" <Er***@discussions.microsoft.com> wrote in message
> news:9F**********************************@microsof t.com...
> > 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
> >> what
> >> database type you're using, so if this is SQL, use Query Analyzer.
> >> Access,
> >> the query editor window, etc.
> >>
> >> Ray at work
> >>
> >>
> >>
> >> "Erica" <Er***@discussions.microsoft.com> wrote in message
> >> news:34**********************************@microsof t.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
> >>
> >>
> >>
>
>
>


Jul 21 '05 #9

P: n/a
How did you deduce that her connection object is being stored in an app
variable? :]

Ray at work

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

Jul 21 '05 #10

P: n/a
What does your GEtCon function look like? -- Wait, sorry, I missed the
"getConn = Application("connectionObject")" line! I'm going to assume that
Application("connectionObject") is your connection string.

Try this code:

Dim oConn, objShop, sSQL
Dim categoryid
Dim sTest
sTest = Application("connectionObject")
RESPONSE.WRITE "CONNECTION STRING: " & STEST & "<HR>"
categoryid = Request.Querystring("cat")
RESPONSE.WRITE "CATEGORY ID: " & CATEGORYID & "<HR>"
sSQL = "select * from tblproducts where catkey = " & categoryid &" order by
catkey"
Set oConn = CreateObject("ADODB.Connection")
oConn.Open Application("connectionObject")
Set objShop = oConn.Execute(sSQL)
Response.Write "Records returned? " & (Not objShop.EOF)
objShop.Close : Set objShop = Nothing

Ray at work



"Erica" <Er***@discussions.microsoft.com> wrote in message
news:31**********************************@microsof t.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:
Alright, what is "getcon" then? Can you post that function?

Ray at home

"Erica" <Er***@discussions.microsoft.com> wrote in message
news:47**********************************@microsof t.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:
>
>> 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" <Er***@discussions.microsoft.com> wrote in message
>> news:9F**********************************@microsof t.com...
>> > 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
>> >> what
>> >> database type you're using, so if this is SQL, use Query Analyzer.
>> >> Access,
>> >> the query editor window, etc.
>> >>
>> >> Ray at work
>> >>
>> >>
>> >>
>> >> "Erica" <Er***@discussions.microsoft.com> wrote in message
>> >> news:34**********************************@microsof t.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
>> >>
>> >>
>> >>
>>
>>
>>


Jul 21 '05 #11

P: n/a
>> getCon=Application("connectionObject")

Bob Lehmann

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:#O*************@TK2MSFTNGP15.phx.gbl...
How did you deduce that her connection object is being stored in an app
variable? :]

Ray at work

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

Jul 21 '05 #12

P: n/a
Notice that it's not _SET_ getCon =, so that would imply that
Application("connectionObject") is most likely a connection string, not a
connection object. It's just named a bit deceivingly.

Ray at work

"Bob Lehmann" <none> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
getCon=Application("connectionObject")


Bob Lehmann

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:#O*************@TK2MSFTNGP15.phx.gbl...
How did you deduce that her connection object is being stored in an app
variable? :]

Ray at work

"thorpe" <te**@tpg.com.au> wrote in message
news:O7**************@TK2MSFTNGP12.phx.gbl...
> your storing your connection object in an application variable? bad

idea.


Jul 21 '05 #13

P: n/a
Generally this means that you are using the ADO constants somewhere, but you
haven't Included adovbs.inc

Jeff

"Erica" <Er***@discussions.microsoft.com> wrote in message
news:34**********************************@microsof t.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

Jul 21 '05 #14

P: n/a
"Des Perado" <de*@per.ado> wrote in message news:<2u*************@uni-berlin.de>...
"Erica" <Er***@discussions.microsoft.com> wrote in message
news:34**********************************@microsof t.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 &"


I think it's the way the paste wrapped. Look at the next line.
Jul 21 '05 #15

P: n/a
"Erica" <Er***@discussions.microsoft.com> wrote in message news:<34**********************************@microso ft.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


Are you sure categoryid is of a valid value?

Terrible idea to store a connection object in an application variable.
Are you sure that app var is valid?

If it used to work, how about permissions on the access file changing?
Jul 21 '05 #16

This discussion thread is closed

Replies have been disabled for this discussion.