M
Matthias S.
Hi,
I'd like to INSERT a string into a database using C#. The way I've tried
it is the following:
sQuery = string.Format("INSERT INTO myTable (Header, Body) VALUES
('{0}','{1}')", sHeader, sBody);
It works fine until I have an occurence of ' (an apostrophy) in either
the string-variables sHeader or sBody. How can I circumvent this?
Thanks in advance!
I'd like to INSERT a string into a database using C#. The way I've tried
it is the following:
sQuery = string.Format("INSERT INTO myTable (Header, Body) VALUES
('{0}','{1}')", sHeader, sBody);
It works fine until I have an occurence of ' (an apostrophy) in either
the string-variables sHeader or sBody. How can I circumvent this?
Thanks in advance!