If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Object doesn't support this property or method: 'RS.Find'

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-28-04, 12:45
chris griffin chris griffin is offline
Registered User
 
Join Date: Apr 2004
Posts: 2
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
Reply With Quote
  #2 (permalink)  
Old 04-28-04, 16:59
Seppuku Seppuku is offline
Useless...
 
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.
Reply With Quote
  #3 (permalink)  
Old 04-29-04, 14:06
chris griffin chris griffin is offline
Registered User
 
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!
Reply With Quote
  #4 (permalink)  
Old 04-29-04, 14:10
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Great! glad to hear it.. happy scripting
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On