Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Arguments are of the wrong type

Reply
Thread Tools

Arguments are of the wrong type

 
 
Erica
Guest
Posts: n/a
 
      10-26-2004
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
 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      10-26-2004

<%
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
Erica
Guest
Posts: n/a
 
      10-27-2004
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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

>
>
>

 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      10-27-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > 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

>>
>>
>>



 
Reply With Quote
 
Erica
Guest
Posts: n/a
 
      10-27-2004
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> > 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
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      10-27-2004
Alright, what is "getcon" then? Can you post that function?

Ray at home

"Erica" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > 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" <(E-Mail Removed)> wrote in message
>> >> news:(E-Mail Removed)...
>> >> > 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
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
Erica
Guest
Posts: n/a
 
      10-27-2004
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> > 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" <(E-Mail Removed)> wrote in message
> >> >> news:(E-Mail Removed)...
> >> >> > 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
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Des Perado
Guest
Posts: n/a
 
      10-27-2004

"Erica" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 &"



 
Reply With Quote
 
thorpe
Guest
Posts: n/a
 
      10-27-2004
your storing your connection object in an application variable? bad idea.

"Erica" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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" <(E-Mail Removed)> wrote in message
> > >> news:(E-Mail Removed)...
> > >> > 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" <(E-Mail Removed)> wrote in message
> > >> >> news:(E-Mail Removed)...
> > >> >> > 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
> > >> >>
> > >> >>
> > >> >>
> > >>
> > >>
> > >>

> >
> >
> >



 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      10-27-2004
How did you deduce that her connection object is being stored in an app
variable? :]

Ray at work

"thorpe" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> your storing your connection object in an application variable? bad idea.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Arguments are of the wrong type...connecting to Access DB thecubemonkey ASP General 1 10-03-2008 10:53 PM
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another ERROR SyrUser03 ASP General 2 03-11-2005 04:25 PM
DataAdd Error: Arguments are wrong type or are out of acceptable r Jack ASP General 1 12-14-2004 11:55 PM
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another Tim Gaunt ASP General 7 12-18-2003 11:59 PM
"Arguments are of the wrong type, out of acceptable range" error J. Muenchbourg ASP General 1 07-25-2003 02:34 PM



Advertisments