Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: ADODB.Recordset (0x800A0BB9) Arguments are of the wrong type,


Message #1 by "Andy F. Jespersen" <andyj@m...> on Thu, 21 Dec 2000 03:37:07 -0000
Error Type:

ADODB.Recordset (0x800A0BB9)

Arguments are of the wrong type, are out of acceptable range, or are in

conflict with one another.

/detail.asp, line 24





Browser Type:

Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) 



Page:

GET /detail.asp 



Here is a snippet of the code that is producing this error.

If someone could manage a suggestion to fix this error, I would appreciate

the help...

Thanx



Assume that the connection is here and it does work...



Set Products=Server.CreateObject("ADODB.recordset")

'sqlText = "SELECT * FROM Products WHERE Products.ProductID =guid " &

(Request("id")) & ";"



sqlText = "SELECT Products.ProductID, Products.MfrID, Products.Name,

Products.Details, Products.Description, Products.DepartmentID,

Products.TypeID, Products.Price, Products.SupplierID, Products.Cost,

Products.StockExpected, Products.ImageUrl, Products.FeaturedProduct "



sqlText = sqlText & "FROM Products WHERE Products.ProductID= "

sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED" & ";"

products.Open sqltext,ocon



The problem arises when I attemp to view detail.asp from default.asp. The

GUID is presenting an error and I have tried everything I can think of and

everything that I have read.



Please Help...



---

http://www.asptoday.com - the leading site for timely,

in-depth information for ASP developers everywhere.

---

You are currently subscribed to asp_database_setup as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_database_setup-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #2 by "Pappas Nikos" <pappas@c...> on Thu, 21 Dec 2000 09:42:01 -0800
Hmm I am a newbbie but I would prefer to reference things like

"3AE7D4A3-D56D-4F70-98A3-720ED92015ED"

as string first like

dim MyValue

MyValue = "3AE7D4A3-D56D-4F70-98A3-720ED92015ED"

same for (Request("id"))

like

dim MyID

MyID = request.form(Request("id")

(if posted)

Depending on your code it is importand sometimes to use code before the HTML

tag

and check your values formats also

I don't know if it will help but it did with me in some cases

I thing he best idea is to reference values and then pass them to your code

Take care

Nick



-----Original Message-----

From: Andy F. Jespersen [mailto:andyj@m...]

Sent: Wednesday, December 20, 2000 7:37 PM

To: ASP Database Setup

Subject: [asp_database_setup] ADODB.Recordset (0x800A0BB9) Arguments are

of the wrong type,





Error Type:

ADODB.Recordset (0x800A0BB9)

Arguments are of the wrong type, are out of acceptable range, or are in

conflict with one another.

/detail.asp, line 24





Browser Type:

Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)



Page:

GET /detail.asp



Here is a snippet of the code that is producing this error.

If someone could manage a suggestion to fix this error, I would appreciate

the help...

Thanx



Assume that the connection is here and it does work...



Set Products=Server.CreateObject("ADODB.recordset")

'sqlText = "SELECT * FROM Products WHERE Products.ProductID =guid " &

(Request("id")) & ";"



sqlText = "SELECT Products.ProductID, Products.MfrID, Products.Name,

Products.Details, Products.Description, Products.DepartmentID,

Products.TypeID, Products.Price, Products.SupplierID, Products.Cost,

Products.StockExpected, Products.ImageUrl, Products.FeaturedProduct "



sqlText = sqlText & "FROM Products WHERE Products.ProductID= "

sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED" & ";"

products.Open sqltext,ocon



The problem arises when I attemp to view detail.asp from default.asp. The

GUID is presenting an error and I have tried everything I can think of and

everything that I have read.



Please Help...





---

http://www.asptoday.com - the leading site for timely,

in-depth information for ASP developers everywhere.

---

You are currently subscribed to asp_database_setup as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_database_setup-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #3 by Imar Spaanjaars <Imar@S...> on Thu, 21 Dec 2000 09:02:28 +0100
The GUID is one of those little irritating datatypes that need to be 

enclosed in apostrophes.

Try this:



sqlText = sqlText & "FROM Products WHERE Products.ProductID= '"

sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED'" & ";"



Although hard to spot, there is an ' right after ProductID= and one right 

after the GUID>



Also, if you are using SQL server (I assume you do since you are using the 

GUID), there is no need for the closing ;

So this should work:



sqlText = sqlText & "FROM Products WHERE Products.ProductID= '"

sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED'"



Depending on your situation and specific needs, you could leave out the 

preceding "Products." on all rows. Since you are only querying from one 

table, it will be easier to read what columns you are reading.

Also, always do a Response.Write before you open the recordset. That way 

you can easily see if there are any errors in your SQL statement.





HtH



Imar





At 03:37 AM 12/21/2000 +0000, you wrote:

>Error Type:

>ADODB.Recordset (0x800A0BB9)

>Arguments are of the wrong type, are out of acceptable range, or are in

>conflict with one another.

>/detail.asp, line 24

>

>

>Browser Type:

>Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

>

>Page:

>GET /detail.asp

>

>Here is a snippet of the code that is producing this error.

>If someone could manage a suggestion to fix this error, I would appreciate

>the help...

>Thanx

>

>Assume that the connection is here and it does work...

>

>Set Products=Server.CreateObject("ADODB.recordset")

>'sqlText = "SELECT * FROM Products WHERE Products.ProductID =guid " &

>(Request("id")) & ";"

>

>sqlText = "SELECT Products.ProductID, Products.MfrID, Products.Name,

>Products.Details, Products.Description, Products.DepartmentID,

>Products.TypeID, Products.Price, Products.SupplierID, Products.Cost,

>Products.StockExpected, Products.ImageUrl, Products.FeaturedProduct "

>

>sqlText = sqlText & "FROM Products WHERE Products.ProductID= "

>sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED" & ";"

>products.Open sqltext,ocon

>

>The problem arises when I attemp to view detail.asp from default.asp. The

>GUID is presenting an error and I have tried everything I can think of and

>everything that I have read.

>

>Please Help...

>







---

http://www.asptoday.com - the leading site for timely,

in-depth information for ASP developers everywhere.

---

You are currently subscribed to asp_database_setup as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_database_setup-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #4 by "Ken Schaefer" <ken@a...> on Thu, 21 Dec 2000 20:26:36 +1100
http://www.adopenstatic.com/faq/800a0bb9.asp



Deals with common causes of 800a0bb9 recordset errors.



Cheers

Ken



----- Original Message -----

From: "Andy F. Jespersen" <andyj@m...>

To: "ASP Database Setup" <asp_database_setup@p...>

Sent: Thursday, December 21, 2000 2:37 PM

Subject: [asp_database_setup] ADODB.Recordset (0x800A0BB9) Arguments are of

the wrong type,





> Error Type:

> ADODB.Recordset (0x800A0BB9)

> Arguments are of the wrong type, are out of acceptable range, or are in

> conflict with one another.

> /detail.asp, line 24

>

>

> Browser Type:

> Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

>

> Page:

> GET /detail.asp

>

> Here is a snippet of the code that is producing this error.

> If someone could manage a suggestion to fix this error, I would appreciate

> the help...

> Thanx

>

> Assume that the connection is here and it does work...

>

> Set Products=Server.CreateObject("ADODB.recordset")

> 'sqlText = "SELECT * FROM Products WHERE Products.ProductID =guid " &

> (Request("id")) & ";"

>

> sqlText = "SELECT Products.ProductID, Products.MfrID, Products.Name,

> Products.Details, Products.Description, Products.DepartmentID,

> Products.TypeID, Products.Price, Products.SupplierID, Products.Cost,

> Products.StockExpected, Products.ImageUrl, Products.FeaturedProduct "

>

> sqlText = sqlText & "FROM Products WHERE Products.ProductID= "

> sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED" & ";"

> products.Open sqltext,ocon

>

> The problem arises when I attemp to view detail.asp from default.asp. The

> GUID is presenting an error and I have tried everything I can think of and

> everything that I have read.

>

> Please Help...





---

http://www.asptoday.com - the leading site for timely,

in-depth information for ASP developers everywhere.

---

You are currently subscribed to asp_database_setup as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_database_setup-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #5 by "Andy Jespersen" <andyj@m...> on Thu, 21 Dec 2000 09:37:16 -0500
Actually I am using Access 2000 as my database with the intent to convert in

the near future to SQL 7.



I tried your suggestion and this stil does not work the code is as follows



sqlText = sqlText & "FROM Products WHERE Products.ProductID= '"

sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED'" & ";"



and even tried the next statements



sqlText = sqlText & "SELECT * FROM Products WHERE ProductID= '"

sqlText = sqlText & "{guid {3AE7D4A3-D56D-4F70-98A3-720ED92015ED}}'" & ";"



and



sqlText = sqlText & "SELECT * FROM Products WHERE ProductID

guidfromstring'"

sqlText = sqlText & "{guid {3AE7D4A3-D56D-4F70-98A3-720ED92015ED}}'" & ";"



I understand the datatype is the problem, but what is the fix...



Help...



Andy





-----Original Message-----

From: bounce-asp_database_setup-294498@p...

[mailto:bounce-asp_database_setup-294498@p...]On Behalf Of Imar

Spaanjaars

Sent: Thursday, December 21, 2000 3:02 AM

To: ASP Database Setup

Subject: [asp_database_setup] Re: ADODB.Recordset (0x800A0BB9) Arguments

are of the wrong type,





The GUID is one of those little irritating datatypes that need to be

enclosed in apostrophes.

Try this:



sqlText = sqlText & "FROM Products WHERE Products.ProductID= '"

sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED'" & ";"



Although hard to spot, there is an ' right after ProductID= and one right

after the GUID>



Also, if you are using SQL server (I assume you do since you are using the

GUID), there is no need for the closing ;

So this should work:



sqlText = sqlText & "FROM Products WHERE Products.ProductID= '"

sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED'"



Depending on your situation and specific needs, you could leave out the

preceding "Products." on all rows. Since you are only querying from one

table, it will be easier to read what columns you are reading.

Also, always do a Response.Write before you open the recordset. That way

you can easily see if there are any errors in your SQL statement.





HtH



Imar





At 03:37 AM 12/21/2000 +0000, you wrote:

>Error Type:

>ADODB.Recordset (0x800A0BB9)

>Arguments are of the wrong type, are out of acceptable range, or are in

>conflict with one another.

>/detail.asp, line 24

>

>

>Browser Type:

>Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

>

>Page:

>GET /detail.asp

>

>Here is a snippet of the code that is producing this error.

>If someone could manage a suggestion to fix this error, I would appreciate

>the help...

>Thanx

>

>Assume that the connection is here and it does work...

>

>Set Products=Server.CreateObject("ADODB.recordset")

>'sqlText = "SELECT * FROM Products WHERE Products.ProductID =guid " &

>(Request("id")) & ";"

>

>sqlText = "SELECT Products.ProductID, Products.MfrID, Products.Name,

>Products.Details, Products.Description, Products.DepartmentID,

>Products.TypeID, Products.Price, Products.SupplierID, Products.Cost,

>Products.StockExpected, Products.ImageUrl, Products.FeaturedProduct "

>

>sqlText = sqlText & "FROM Products WHERE Products.ProductID= "

>sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED" & ";"

>products.Open sqltext,ocon

>

>The problem arises when I attemp to view detail.asp from default.asp. The

>GUID is presenting an error and I have tried everything I can think of and

>everything that I have read.

>

>Please Help...

>





---

http://www.asptoday.com - the leading site for timely,

in-depth information for ASP developers everywhere.

---

You are currently subscribed to asp_database_setup as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_database_setup-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #6 by Imar Spaanjaars <Imar@S...> on Thu, 21 Dec 2000 18:34:00 +0100
I think that something else is going wrong. What is the exact error you are 

getting?



I tried to replicate the situation by doing the following:



1. I created a simple Access 2000 database, with an Autonumber Replication 

ID (the GUID of Access, AFAIK), the column is called ID

2. I inserted a few Records

3. I did a select for: WHERE ID = '{31B7F5EC-D796-4BEA-8C09-4188B55F6E00}' 

(including the curly brackets)

4. I got a record back, so it was working.



I can mail you the database and code in case you are interested.



Otherwise, post your complete page here, because maybe something else is 

going wrong, like:



1. Undefined ADO constants. Include the file ADOVBS.inc, or define any 

constant yourself

2. Not enough rights to the database

3. A typo ;-)

4. You name it .......





HtH



Imar







At 09:37 AM 12/21/2000 -0500, you wrote:

>Actually I am using Access 2000 as my database with the intent to convert in

>the near future to SQL 7.

>

>I tried your suggestion and this stil does not work the code is as follows

>

>sqlText = sqlText & "FROM Products WHERE Products.ProductID= '"

>sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED'" & ";"

>

>and even tried the next statements

>

>sqlText = sqlText & "SELECT * FROM Products WHERE ProductID= '"

>sqlText = sqlText & "{guid {3AE7D4A3-D56D-4F70-98A3-720ED92015ED}}'" & ";"

>

>and

>

>sqlText = sqlText & "SELECT * FROM Products WHERE ProductID

>guidfromstring'"

>sqlText = sqlText & "{guid {3AE7D4A3-D56D-4F70-98A3-720ED92015ED}}'" & ";"

>

>I understand the datatype is the problem, but what is the fix...

>

>Help...

>

>Andy

>

>

>-----Original Message-----

>From: bounce-asp_database_setup-294498@p...

>[mailto:bounce-asp_database_setup-294498@p...]On Behalf Of Imar

>Spaanjaars

>Sent: Thursday, December 21, 2000 3:02 AM

>To: ASP Database Setup

>Subject: [asp_database_setup] Re: ADODB.Recordset (0x800A0BB9) Arguments

>are of the wrong type,

>

>

>The GUID is one of those little irritating datatypes that need to be

>enclosed in apostrophes.

>Try this:

>

>sqlText = sqlText & "FROM Products WHERE Products.ProductID= '"

>sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED'" & ";"

>

>Although hard to spot, there is an ' right after ProductID= and one right

>after the GUID>

>

>Also, if you are using SQL server (I assume you do since you are using the

>GUID), there is no need for the closing ;

>So this should work:

>

>sqlText = sqlText & "FROM Products WHERE Products.ProductID= '"

>sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED'"

>

>Depending on your situation and specific needs, you could leave out the

>preceding "Products." on all rows. Since you are only querying from one

>table, it will be easier to read what columns you are reading.

>Also, always do a Response.Write before you open the recordset. That way

>you can easily see if there are any errors in your SQL statement.

>

>

>HtH

>

>Imar

>

>

>At 03:37 AM 12/21/2000 +0000, you wrote:

> >Error Type:

> >ADODB.Recordset (0x800A0BB9)

> >Arguments are of the wrong type, are out of acceptable range, or are in

> >conflict with one another.

> >/detail.asp, line 24

> >

> >

> >Browser Type:

> >Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

> >

> >Page:

> >GET /detail.asp

> >

> >Here is a snippet of the code that is producing this error.

> >If someone could manage a suggestion to fix this error, I would appreciate

> >the help...

> >Thanx

> >

> >Assume that the connection is here and it does work...

> >

> >Set Products=Server.CreateObject("ADODB.recordset")

> >'sqlText = "SELECT * FROM Products WHERE Products.ProductID =guid " &

> >(Request("id")) & ";"

> >

> >sqlText = "SELECT Products.ProductID, Products.MfrID, Products.Name,

> >Products.Details, Products.Description, Products.DepartmentID,

> >Products.TypeID, Products.Price, Products.SupplierID, Products.Cost,

> >Products.StockExpected, Products.ImageUrl, Products.FeaturedProduct "

> >

> >sqlText = sqlText & "FROM Products WHERE Products.ProductID= "

> >sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED" & ";"

> >products.Open sqltext,ocon

> >

> >The problem arises when I attemp to view detail.asp from default.asp. The

> >GUID is presenting an error and I have tried everything I can think of and

> >everything that I have read.

> >

> >Please Help...

> >

>







---

http://www.asptoday.com - the leading site for timely,

in-depth information for ASP developers everywhere.

---

You are currently subscribed to asp_database_setup as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_database_setup-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #7 by "Andy Jespersen" <andyj@m...> on Thu, 21 Dec 2000 14:53:29 -0500
Yah I made stupid spelling mistake

I should have used the Option Explicit statement from the start...

Thanks for your help, but I have it working now...



Thanx



Andy



-----Original Message-----

From: bounce-asp_database_setup-294498@p...

[mailto:bounce-asp_database_setup-294498@p...]On Behalf Of Imar

Spaanjaars

Sent: Thursday, December 21, 2000 12:34 PM

To: ASP Database Setup

Subject: [asp_database_setup] Re: ADODB.Recordset (0x800A0BB9) Arguments

are of the wrong type,





I think that something else is going wrong. What is the exact error you are

getting?



I tried to replicate the situation by doing the following:



1. I created a simple Access 2000 database, with an Autonumber Replication

ID (the GUID of Access, AFAIK), the column is called ID

2. I inserted a few Records

3. I did a select for: WHERE ID = '{31B7F5EC-D796-4BEA-8C09-4188B55F6E00}'

(including the curly brackets)

4. I got a record back, so it was working.



I can mail you the database and code in case you are interested.



Otherwise, post your complete page here, because maybe something else is

going wrong, like:



1. Undefined ADO constants. Include the file ADOVBS.inc, or define any

constant yourself

2. Not enough rights to the database

3. A typo ;-)

4. You name it .......





HtH



Imar







At 09:37 AM 12/21/2000 -0500, you wrote:

>Actually I am using Access 2000 as my database with the intent to convert

in

>the near future to SQL 7.

>

>I tried your suggestion and this stil does not work the code is as follows

>

>sqlText = sqlText & "FROM Products WHERE Products.ProductID= '"

>sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED'" & ";"

>

>and even tried the next statements

>

>sqlText = sqlText & "SELECT * FROM Products WHERE ProductID= '"

>sqlText = sqlText & "{guid {3AE7D4A3-D56D-4F70-98A3-720ED92015ED}}'" & ";"

>

>and

>

>sqlText = sqlText & "SELECT * FROM Products WHERE ProductID

>guidfromstring'"

>sqlText = sqlText & "{guid {3AE7D4A3-D56D-4F70-98A3-720ED92015ED}}'" & ";"

>

>I understand the datatype is the problem, but what is the fix...

>

>Help...

>

>Andy

>

>

>-----Original Message-----

>From: bounce-asp_database_setup-294498@p...

>[mailto:bounce-asp_database_setup-294498@p...]On Behalf Of Imar

>Spaanjaars

>Sent: Thursday, December 21, 2000 3:02 AM

>To: ASP Database Setup

>Subject: [asp_database_setup] Re: ADODB.Recordset (0x800A0BB9) Arguments

>are of the wrong type,

>

>

>The GUID is one of those little irritating datatypes that need to be

>enclosed in apostrophes.

>Try this:

>

>sqlText = sqlText & "FROM Products WHERE Products.ProductID= '"

>sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED'" & ";"

>

>Although hard to spot, there is an ' right after ProductID= and one right

>after the GUID>

>

>Also, if you are using SQL server (I assume you do since you are using the

>GUID), there is no need for the closing ;

>So this should work:

>

>sqlText = sqlText & "FROM Products WHERE Products.ProductID= '"

>sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED'"

>

>Depending on your situation and specific needs, you could leave out the

>preceding "Products." on all rows. Since you are only querying from one

>table, it will be easier to read what columns you are reading.

>Also, always do a Response.Write before you open the recordset. That way

>you can easily see if there are any errors in your SQL statement.

>

>

>HtH

>

>Imar

>

>

>At 03:37 AM 12/21/2000 +0000, you wrote:

> >Error Type:

> >ADODB.Recordset (0x800A0BB9)

> >Arguments are of the wrong type, are out of acceptable range, or are in

> >conflict with one another.

> >/detail.asp, line 24

> >

> >

> >Browser Type:

> >Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

> >

> >Page:

> >GET /detail.asp

> >

> >Here is a snippet of the code that is producing this error.

> >If someone could manage a suggestion to fix this error, I would

appreciate

> >the help...

> >Thanx

> >

> >Assume that the connection is here and it does work...

> >

> >Set Products=Server.CreateObject("ADODB.recordset")

> >'sqlText = "SELECT * FROM Products WHERE Products.ProductID =guid " &

> >(Request("id")) & ";"

> >

> >sqlText = "SELECT Products.ProductID, Products.MfrID, Products.Name,

> >Products.Details, Products.Description, Products.DepartmentID,

> >Products.TypeID, Products.Price, Products.SupplierID, Products.Cost,

> >Products.StockExpected, Products.ImageUrl, Products.FeaturedProduct "

> >

> >sqlText = sqlText & "FROM Products WHERE Products.ProductID= "

> >sqlText = sqlText & "3AE7D4A3-D56D-4F70-98A3-720ED92015ED" & ";"

> >products.Open sqltext,ocon

> >

> >The problem arises when I attemp to view detail.asp from default.asp. The

> >GUID is presenting an error and I have tried everything I can think of

and

> >everything that I have read.

> >

> >Please Help...

> >

>





---

http://www.asptoday.com - the leading site for timely,

in-depth information for ASP developers everywhere.

---

You are currently subscribed to asp_database_setup as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_database_setup-$subst('Recip.MemberIDChar')@p2p.wrox.com


  Return to Index