473,473 Members | 2,215 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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
Jul 21 '05 #1
15 7191

<%
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
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
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
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
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
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

"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
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
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
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
>> 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
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
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
"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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: J. Muenchbourg | last post by:
I'm getting an "Arguments are of the wrong type, out of acceptable range, in conflicts with each other " error , pointing to the sql statement in this block: Dim rstime Set rstime =...
7
by: Tim Gaunt | last post by:
Hi, I'm hoping that someone will be able to help me with this one, I'm developing an application which basically inserts a load of data into the database ready for validation at a later date, I...
9
by: Csaba Gabor | last post by:
Inside a function, I'd like to know the call stack. By this I mean that I'd like to know the function that called this one, that one's caller and so on. So I thought to do: <script...
12
by: BartlebyScrivener | last post by:
I'm still new at this. I can't get this to work as a script. If I just manually insert the values for sys.argv and sys.argv it works fine, but I can't pass the variables from the command line. What...
4
by: mantrid | last post by:
Hello Hope you can help. I have been using the code below to move elenents around the page. This has worked fine until I put some arguments into the functions so I could use them in many places...
1
by: Java Guy | last post by:
I'm trying to view a web page. IE tells me there are (Java?) errors on the page. Here they are: Line: 15 Char: 7 Error: Wrong number of arguments or invalid propert assignment Code: 0 URL:...
7
by: VK | last post by:
I was getting this effect N times but each time I was in rush to just make it work, and later I coudn't recall anymore what was the original state I was working around. This time I nailed the...
12
by: claudiu | last post by:
Hi, I'll go straight to the first question. Why does the code below compile? void f(int i = 0); int main() { (&f)();
12
by: anantraoneel | last post by:
Hi Friend My project is a Library System. In Project is Book Master form. If I've select Book Type from Type Master and Publication from Publication Master then this error has come: "Arguments...
5
by: subramanian100in | last post by:
I am copying the following text as it is from Stroustrup's TC++PL 3rd edition, page 450. It says: "Note that a constructor given two arguments of the same type can be a match for more than...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.