代码如下改写 try TQuery1.SQL.Clear;TQuery1.SQL.Text:='Insert Into Table_Student (SNo,SName,SDepID,SAge,SMark) Values(_sno,_sname,_sdepid,_sage,_s)'; except on e:exception do if pos(e.message,'重复') then exit; //find the key word you want to do //if you want to get the error code ,you can look the book from liweiend; 可以提高10倍以上效率
try
TQuery1.SQL.Clear;TQuery1.SQL.Text:='Insert Into Table_Student (SNo,SName,SDepID,SAge,SMark) Values(_sno,_sname,_sdepid,_sage,_s)';
except on e:exception do if pos(e.message,'重复') then
exit;
//find the key word you want to do
//if you want to get the error code ,you can look the book from liweiend;
可以提高10倍以上效率
楼上的就可以
你用delphi当然不如pb了,因为你delphi还没入门
我用pb当然不如delphi了,因为我没学过pb
大家说对不对?