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 15 7075
<%
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
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
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
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
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 >> >> >>
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 >> >> >>
"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 &"
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 > >> > >> > >> > > >
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.
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 >> >> >> >> >> >> >> >> >>
>> 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.
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.
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
"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.
"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? This discussion thread is closed Replies have been disabled for this discussion. Similar topics
1 post
views
Thread by J. Muenchbourg |
last post: by
|
7 posts
views
Thread by Tim Gaunt |
last post: by
|
9 posts
views
Thread by Csaba Gabor |
last post: by
|
12 posts
views
Thread by BartlebyScrivener |
last post: by
|
4 posts
views
Thread by mantrid |
last post: by
|
1 post
views
Thread by Java Guy |
last post: by
|
7 posts
views
Thread by VK |
last post: by
|
12 posts
views
Thread by claudiu |
last post: by
| |
5 posts
views
Thread by subramanian100in |
last post: by
| | | | | | | | | | |