OCI Parse problem

From: Ramdane MAHIOU <ramdane.mahiou_at_cstelecom.cie-signaux.fr>
Date: 1999/03/05
Message-ID: <36DFEF51.ED83EE2_at_cstelecom.cie-signaux.fr>#1/1


Hello!
I'm trying to sort out a problem I have with the OCI programming, maybe you could help me:

I'm using the OCI with C++.
I have a string : char * toto ;
toto is set to a certain value by the application: 'L'aumone' for example.
( so at this point toto='L'aumone')

Then I'm building my request string:

char * sql_dml = "insert into sites values(1, '"; sql_dml = sql_dml + toto
sql_dml = ')";

And then I parse the request ...I get an error there because the whole request is now : "insert into sites values(1,'L'aumone')"; The error is that there is the ' character in the middle of the string 'L'aumone'...It should be 'L''aumone' to make it work, but unfortunately

I don't know what is in the toto string until that point.I'm totally blind about
the content of the string toto until I get it as a parameter... Do you know a solution to my problem?

Thanks!

Ram Received on Fri Mar 05 1999 - 00:00:00 CET

Original text of this message