• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

ADODB Recordset Find error

Hello

I have the following situation, i have a disconnected recordset. and now in my client i want to search for a specific item.
It works fine but when i have a ' in my string it isn't working. thats ofcourse because of the ' in the string.
my code is the following

value = "it's a test"

RS.Find("field = '" & value & "'")

How can i solve my problem, is there an escape charater for this problem.

greetingz Paul
0
pvandelouw
Asked:
pvandelouw
1 Solution
 
TimCotteeCommented:
Just double the ' character:

RS.Find "Field = '" & Replace(Value,"'","''") & "'"

0
 
pvandelouwAuthor Commented:
thank you very much, and really quick too. thanks

greetingz paul
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now