CHAR(39)
PRINT CHAR(39) + '12345' + CHAR(39)
string ss = "12345"; SqlCommand cmd = new SqlCommand("INSERT INTO tblTemp(Code) VALUES(CHAR(39)+'"+str+"'+CHAR(39))", con); //con is your connection object
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)