...

View Full Version : Error : ADODB.Recordset (0x800A0CB3)



victoria_1018
10-23-2003, 08:33 AM
Hi,
I had encountered an error in my program
The error is:

Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.
/OnlineStore/ShoppingCart/ProductList.asp, line 29


I had tried but can't see where had gone wrong.
Can anyone help me with this please.
Thank You
I had attached the coding in a zip file.

Thank You
Victoria

glenngv
10-23-2003, 09:08 AM
prodRS.Open "Products", Con, 3, 3

The cursortype is correct (3=adOpenStatic). It may be that Access doesn't support that.

victoria_1018
10-23-2003, 09:16 AM
I am not very sure, but when I try without the page break, it work.
Is there anything I can do to modify the script?

victoria_1018
10-23-2003, 09:39 AM
Hi,
I think the error fall on this line
prodRS.AbsolutePage = pg
Does anyone know what wrong with this?
Regards
victoria

glenngv
10-23-2003, 09:54 AM
ahh, you're not using the rs.Open method.
remove the Con.Execute line and use the open method

'Set prodRS= Con.Execute(sqlString) 'don't use this!

Con.Open "driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("\OnlineStore") & "\StoreDB.mdb"

Set prodRS= Server.CreateObject("ADODB.Recordset")
prodRS.CursorType = adOpenStatic
prodRS.AbsolutePage = pg
prodRS.PageSize = 5
sqlString = "SELECT * FROM Products " &_
"WHERE product_status = 1 " &_
"AND ( product_category LIKE '%" & product_category & "%' " &_
"OR product_brand LIKE '%" & product_brand & "%') " &_
"ORDER BY product_name "

prodRS.Open sqlString, Con

you should set all the needed properties of the recordset object before calling the open() method.

since you're using the constant adOpenStatic, make sure the adovbs.inc must be included in the asp page. Or you may just use the value 3.

victoria_1018
10-23-2003, 10:17 AM
I had try all way and the error fall on this line
prodRS.AbsolutePage = pg
If this line is removed, the program work but no page break.
Is there anyother way to create a page break?
Thanks

glenngv
10-23-2003, 10:24 AM
Did you try the code I posted?
As I said, you should set the properties of a recordset object before you execute the SQL statement.

victoria_1018
10-23-2003, 10:44 AM
My Program Works Now
Thank glenngv,

Regards
Victoria:o

glenngv
10-23-2003, 10:55 AM
Does the value of the product_category variable contain double quotes? If you expect special characters in a variable and you will insert it in a URL, you should encode it.

<a href="ProductList?product_category=<%=server.urlencode(product_category)%>&pg=<%=i%>"><%=i%></a>

victoria_1018
10-23-2003, 10:56 AM
Hi,
I found my mistake.
Thank You Very Much. glenngv
Regards
victoria:o

anandkumarsingh
08-21-2009, 09:18 AM
I'm sure that your following code would raise the following error:
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.
-------------------------------------------------------------------


ahh, you're not using the rs.Open method.
remove the Con.Execute line and use the open method

'Set prodRS= Con.Execute(sqlString) 'don't use this!

Con.Open "driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("\OnlineStore") & "\StoreDB.mdb"

Set prodRS= Server.CreateObject("ADODB.Recordset")
prodRS.CursorType = adOpenStatic
prodRS.AbsolutePage = pg
prodRS.PageSize = 5
sqlString = "SELECT * FROM Products " &_
"WHERE product_status = 1 " &_
"AND ( product_category LIKE '%" & product_category & "%' " &_
"OR product_brand LIKE '%" & product_brand & "%') " &_
"ORDER BY product_name "

prodRS.Open sqlString, Con

you should set all the needed properties of the recordset object before calling the open() method.

since you're using the constant adOpenStatic, make sure the adovbs.inc must be included in the asp page. Or you may just use the value 3.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum