Typically, if you Do a string.replace and replace the single quote with
double quotes, it will work for most RDBMS systems. This will do it even if
there's no quote present, the replace will just be ignored. I highly
recommend against this type of methodology, but if you are sure this is what
you want to do...
Dim s As String = "O'Brien"
MessageBox.Show(s.Replace("'", "''"))
"DDE" <dd*@iaireinfo.com> wrote in message
news:O3**************@TK2MSFTNGP11.phx.gbl...
Hi,
I am not using Parameters in this case, I am just lookin for a method to
do the thing.
Dominique
"William Ryan" <do********@comcast.nospam.net> wrote in message
news:eq**************@tk2msftngp13.phx.gbl... Use an OledbParameter instead and let it take care of it for you.
"DDE" <dd*@iaireinfo.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... Hi,
wich way can I escape a string sent to an OleDbComman containing
single quote?
Thanks
Dominique