Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    Hong Kong
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error : ADODB.Recordset (0x800A0CB3)

    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
    Attached Files Attached Files
    Last edited by victoria_1018; 10-23-2003 at 08:45 AM.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,950
    Thanks
    0
    Thanked 236 Times in 233 Posts
    prodRS.Open "Products", Con, 3, 3

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

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Location
    Hong Kong
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  • #4
    Regular Coder
    Join Date
    Aug 2002
    Location
    Hong Kong
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,
    I think the error fall on this line
    prodRS.AbsolutePage = pg
    Does anyone know what wrong with this?
    Regards
    victoria

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,950
    Thanks
    0
    Thanked 236 Times in 233 Posts
    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.

  • #6
    Regular Coder
    Join Date
    Aug 2002
    Location
    Hong Kong
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #7
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,950
    Thanks
    0
    Thanked 236 Times in 233 Posts
    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.

  • #8
    Regular Coder
    Join Date
    Aug 2002
    Location
    Hong Kong
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My Program Works Now
    Thank glenngv,

    Regards
    Victoria
    Last edited by victoria_1018; 10-23-2003 at 10:56 AM.

  • #9
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,950
    Thanks
    0
    Thanked 236 Times in 233 Posts
    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>

  • #10
    Regular Coder
    Join Date
    Aug 2002
    Location
    Hong Kong
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,
    I found my mistake.
    Thank You Very Much. glenngv
    Regards
    victoria

  • #11
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm sure that your following code would raise the following error:
    ADODB.Recordset (0x800A0E78)
    Operation is not allowed when the object is closed.
    -------------------------------------------------------------------

    Quote Originally Posted by glenngv View Post
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •