I need to know what the solution is to translate the following Delphi lines so that they will compile with C++ and be valid SQL statements.

Delphi

sSQL := 'INSERT INTO testtable(Name,OtherID,Number,Notes) VALUES ("Some Name",4,587.6594,"Here are some notes");';

sSQL := 'INSERT INTO testtable(Name,OtherID,Number,Notes) VALUES ("Another Name",12,4758.3265,"More notes");';


The following won' t compile. What do you do about the double-quotes as in "Some Name", "Here are some notes", "Another Name", and "More notes"? I can get it to compile if I use \" but that causes a SQL exception.


BCB6

sSQL = "INSERT INTO testtable(Name,OtherID,Number,Notes) VALUES ("Some Name",4,587.6594,"Here are some notes");";

sSQL = "INSERT INTO testtable(Name,OtherID,Number,Notes) VALUES ("Another Name",12,4758.3265,"More notes");";


Corwin




Reply via email to