Hi guys!
I would like to know how to handle apostrophe in a SQL statement. I'm getting an error when I process the statement below:
tmpfullname = "O'CONNOR, MARLYN VALLE"
strSQL = "Select FullName from BRGY Where Fullname = '" & tmpfullname & "'"
set rsconn = New ADODB.Recordset
rsconn.Open strSQL, conn, adOpenDynamic, adLockOptimistic, adCmdText
If tmpfullname has no apostrophe in it, no error is given.
I'm using VB6 and SQL Server 7.
Thanks in advance.
I would like to know how to handle apostrophe in a SQL statement. I'm getting an error when I process the statement below:
tmpfullname = "O'CONNOR, MARLYN VALLE"
strSQL = "Select FullName from BRGY Where Fullname = '" & tmpfullname & "'"
set rsconn = New ADODB.Recordset
rsconn.Open strSQL, conn, adOpenDynamic, adLockOptimistic, adCmdText
If tmpfullname has no apostrophe in it, no error is given.
I'm using VB6 and SQL Server 7.
Thanks in advance.