Close
jGuru Forums
Posted By: sabu_vs Posted On: Friday, May 24, 2002 04:23 AM
Hi
I have 2 questions. 1.I want to insert single quotes in database.When I try to insert this; the progrm shows a syntax error. eg; "insert into mytable values('this is 'a value with single quotes')" Is it posiible to escape the single quotes using escape syntax.If yes how? Is there any other methd to do this? 2.I have a table that contains a unique key[eg name]. If I insert a duplicate key the program shows an error. Is it possible to find the field that violated the unique key constraint.[ inthis eg] thanks very much sabu
Re: <font color=red>Help me to solve these problems</font>
Posted By: Anonymous Posted On: Saturday, May 25, 2002 12:34 AM
Posted By: Steve_Long Posted On: Friday, May 24, 2002 05:14 AM
2. catch the exception from the insert or update statement and print out the values of the unique key fields when the constraint violation occurs.