i have an SQL insert statement which inserts a string into the database. However my string contains single quotes. Iam trying to replace the single quotes with double quotes for proper insertion into sql server.
firstchars= firstchars.Replace("'", " " " ).Trim();
insert into table values(firstchars);
Iam getting an error as new line constant expected.
Can anyone tell me what the correct code is??
Any furthur comments and suggestions are welcome.
Thanks in advance.