try
query1.execsql;
form1.database1.commit;
application.messagebox('数据存盘成功!','提示信息',48);
except
on e:exception do
begin
application.messagebox(pchar('数据存盘失败!'+#13+#13+e.message),'错误信息',16);
form1.database1.rollback;
end
end;
删除:
query1.close;
query1.sql.clear;
query1.sql.add('delete from mytable where xm=''张三''');
query1.execsql;