here is my code, the colunm named col in table aaa is set to primary key
with oraquery1 do
begin
try
close;
sql.clear;
sql.add('insert into aaa(col1) values (1)');
execute;
except
on E:Eoraerror do
begin
orasession1.rollback;
showmessage(e.message);
end;
end;
my question is when i insert same value in table aaa,the code should tell me the message,but it can't work