Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this message
<%
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
Post Follow-up to this messageThe 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...
>
>
>
Post Follow-up to this messageYou 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: >
Post Follow-up to this messageYes, 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... > > >
Post Follow-up to this messageAlright, 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: >
Post Follow-up to this messageRay, 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... > > >
Post Follow-up to this message"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 &"
Post Follow-up to this messageyour 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
Post Follow-up to this messageHow 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.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.