HELP in comparing strSQL with string having ' in it

NewComer

Active member
Joined
Jan 2, 2010
Messages
34
Programming Experience
Beginner
The following code having error because the name having a ' in it:

Dim str_Name As String
Dim strSQL As String

str_Name = "Marie D'Emma"

strSQL = "SELECT * FROM Employee WHERE Name = '" & str_Name & "'"
da = New OleDbDataAdapter(strSQL, dbConn)


How can I fix it? Considering I must search for that French name? :confused:
 
Back
Top