Hi All,
I am having problems with the following insert statement when the values that are inserted contain single quotes. I have been trying to use the verbatim string ( @ in c#) but i have not been able to fiqure it out. Any ideas or suggestions?
"INSERT INTO Details Values('" + compId + "','" + compName + "','" + todaysDate + "','" + homeDesk + "','" + operSys + "','" + twoComp + "','" + accNetDesk + "','" + accNetLap + "','" + accNetRsn + "','" + intCon + "','" + ispName + "','" + deskAntiVir + "','" + validAntLic + "','" + upgdSoft + "','" + updgDef + "','" + antivirName + "','" + fireWall + "','" + fireWallKnow + "','" + smpt + "','" + pop + "','" + pptp + "','" + ftp + "','" + http + "','" + phyFire + "','" + phyFireName + "','" + accNetOther + "','" + achoDesc + "','" + accClientHD + "','" + achdDesc + "','" + accClientHL + "','" + achlDesc + "')";
thanks,
kf
I am having problems with the following insert statement when the values that are inserted contain single quotes. I have been trying to use the verbatim string ( @ in c#) but i have not been able to fiqure it out. Any ideas or suggestions?
"INSERT INTO Details Values('" + compId + "','" + compName + "','" + todaysDate + "','" + homeDesk + "','" + operSys + "','" + twoComp + "','" + accNetDesk + "','" + accNetLap + "','" + accNetRsn + "','" + intCon + "','" + ispName + "','" + deskAntiVir + "','" + validAntLic + "','" + upgdSoft + "','" + updgDef + "','" + antivirName + "','" + fireWall + "','" + fireWallKnow + "','" + smpt + "','" + pop + "','" + pptp + "','" + ftp + "','" + http + "','" + phyFire + "','" + phyFireName + "','" + accNetOther + "','" + achoDesc + "','" + accClientHD + "','" + achdDesc + "','" + accClientHL + "','" + achlDesc + "')";
thanks,
kf