Hi,
I would greatly appreciate it if anyone could help me figure out how to pass a SQL string to an Oracle database if the where criteria has a single quote in it somewhere.
For Example:
Select * From tblTitle Where Title = "A Book's Title"
I tried using this statement below where me.txtTitle = "A Book's Title":
strSQL = "Select * from tblTitle Where Title = " & CHR$(34) & me.txtTitle & CHR$(34)
but this didn't work.
I know in Oracle you must "SET SCAN OFF" and put another single quote in front of the existing quote, but I'm not sure how to do this in VB.
Help Please!!
I would greatly appreciate it if anyone could help me figure out how to pass a SQL string to an Oracle database if the where criteria has a single quote in it somewhere.
For Example:
Select * From tblTitle Where Title = "A Book's Title"
I tried using this statement below where me.txtTitle = "A Book's Title":
strSQL = "Select * from tblTitle Where Title = " & CHR$(34) & me.txtTitle & CHR$(34)
but this didn't work.
I know in Oracle you must "SET SCAN OFF" and put another single quote in front of the existing quote, but I'm not sure how to do this in VB.
Help Please!!