473,372 Members | 901 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

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 7186

<%
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.