Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    2

    Unanswered: Object doesn't support this property or method: 'RS.Find'

    Hi...I'm no guru on ASP or VBScript but here goes.

    I have almost completed tweaking vbscript to run on mysql rather than the Access database it was designed for. Trial and error, luck and a bit of detective work have got me this far, however I am getting the following error when tryinf to update existing records in the database

    Microsoft VBScript runtime error '800a01b6'
    Object doesn't support this property or method: 'RS.Find'
    /faq/admin/edit2.asp, line 7

    The piece of script looks like this in Dweaver

    Set RS = Server.CreateObject("ADODB.Recordset")
    RS.Open "Questions", Conn, 2, 2
    RS.Find "ID='" & Request("ID") & "'"

    The .Find text is black whereas all other "methods"(?) like the .Open are pink. Is it that the .Find method works with access and not mysql and if so waht is the equivalent or am I barking up the wrong tree?

    Any help much appreciated

    Thanks

    Chris

  2. #2
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Instead of:
    RS.Open "Questions", Conn, 2, 2

    Try:
    RS.Open "SELECT * FROM Questions WHERE ID = '" & Request("ID") & "'", Conn, 2, 2
    (Assuming "Questions" is a table in the MySQL DB you're connected to)

    This is a much better way to query for data since you will only receive the rows that match your WHERE clause, and not the whole table. Besides, I don't believe "Find" is a valid method in the ADODB.Recordset object.
    That which does not kill me postpones the inevitable.

  3. #3
    Join Date
    Apr 2004
    Posts
    2
    Bang on Seppuku. You're a star. Thanks. It worked a treat. Ive been through all the scripts and swapped out the rs.find statements and have leaped ahead. I'm not quite out of the woods yet but I can see the fields!

  4. #4
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Great! glad to hear it.. happy scripting
    That which does not kill me postpones the inevitable.

Posting Permissions

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