Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

recordset.find method

Status
Not open for further replies.

Kinl

Programmer
Mar 19, 2001
168
US
I'm using the recorset.find method for ADO and i'm having a problem when I'm trying to find a record that has an apostrophe in it.

objRs.Find "ToyName='Bob's French Fry'"

I get this error:
Error Type:

ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another

But the Find Method works for any other string that does not have an apostrophe in it.

Any suggestions?

Thanx,

shorty
 
Kinl,

Try this

ojbRs.Find "toyname LIKE 'Bob*'"

or for providers that dont support Rs.Find
If objRs.Support(adFind) Then
objRs.Find "toyname LIKE 'Bob*'"

I hope this helps out

Aaron
 
Or try to double the quotes... (works in SQL)
objRs.Find "ToyName='Bob''s French Fry'" ________
George, M
email : shaddow11_ro@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top