Delphi ÓйØÊÂÎñµÄ´¦Àí - Delphi / Êý¾Ý¿âÏà¹Ø
Delphi(Pascal) code:
procedure TfrmRQZLGL.btnDelete_ZLClick(Sender: TObject);
var
Str1,Str2:string;
begin
if Application.MessageBox('ÕýÔÚɾ³ýÐÅÏ¢£¬ÊÇ·ñ¼ÌÐø£¿', 'ÌáʾÐÅÏ¢', MB_YESNO +
MB_ICONQUESTION) = IDYES then
begin
Str1 := Format('delete from RQ_ZLZB where BillNo = %s',[qry_ZLZB.FieldByName('BillNo').AsString]);
Str2 := Format('delete from RQ_ZLMXB where BillNo = %s',[qry_ZLZB.FieldByName('BillNo').AsString]);
if not DMMain.conMain.InTransaction then DMMain.conMain.BeginTrans;
try
DMMain.ExecSQLA(Str1);
DMMain.ExecSQLA(Str2);
except
if DMMain.conMain.InTransaction then DMMain.conMain.RollbackTrans;
end;
DMMain.conMain.CommitTrans;
end;
end;
ÓÐÒÔÉÏ´úÂ룬ÓÃÀ´É¾³ýÖ÷±íºÍ´Ó±íµÄ¹ØÁªÊý¾Ý£¬µ«ÊÇ ±¨´íÁË£¬Ëµ ¡®Ã»ÓлÊÂÎñ¡¯£¬Íû¸ßÈËÖ¸µã£¡
Ó¦¸ÃÊdzö´íºóRollbackTransºóÔÙÖ´ÐÐCommitTrans±¨´í°É
Delphi(Pascal) code:
try
DMMain.ExecSQLA(Str1);
DMMain.ExecSQLA(Str2);
Except
if DMMain.conMain.InTransaction then DMMain.conMain.RollbackTrans;
end;
DMMain.conMain.CommitTrans;
ÎÒÊÇÔÚ Except ÀïÃæÐ´µÄ RollBackTrans ×îºóCommitTransµÄ
{
Ïà¹ØÎÊ´ð£º
delphi ÊÖ¶¯×°ÔØÇý¶¯ÎļþÌáʾ£º
RROR (1058): The driver is marked as disabled (Start=4) in its service database entry.
ÊDz»ÊÇÕâ¸öÇý¶¯±ØÐèÒªÓÃINFÀ´°²×°¡£¡£ÓÃ×Ô´øµÄINFÀ´×°ÊÇÕý³£µÄ¡£ÓÃÊÖ¶¯×°ÔؾÍÌáʾÈçÉÏ¡ ......
Àý×Ó³ÌÐò¼û¸½¼þ£¬ÓÃDelphi 7½øÐбàÒë
ÎÊÌâ´úÂëΪ
Delphi(Pascal) code:
if Node.ChildNodes <> nil then
begin
for i := 0 to Node.ChildNodes.Count - 1 do
begin
cNode := N ......
ÒÔǰÖмäÕ¾ÊǵçÄÔͨ¹ý´®¿Ú¿ØÖƵģ¬ÏÖÔڸijÉÁËUSB½Ó¿Ú£¬ÇëÎÊÒªÔõô×ö°¡£¿Çó¸ßÊÖÖ¸µãÒ»ÏÂ
ÊÇusbת´®¿ÚÂð£¿ÄÇÓ¦¸Ã»¹ÊÇ¿ÉÒÔ°´´®¿Ú²Ù×÷µÄ£¬Ö»ÊÇËٶȲ»ÄÜÌ«¸ß
Èç¹û²»ÊÇusbת´®¿Ú£¬Çë²éÔÄusbÇý¶¯µÄsdk˵Ã÷¡£
Õâ¸öÊDz ......
ÎÒÔÚÖ´ÐÐDelphi2010µÄʱºò£¬Ã»ÓгöÏÖÖ´ÐеĽçÃæ£¬Çó¸ßÊÖ°ïæ£¬Ð»Ð»
End_rbody_65722921//-->
¸Ã»Ø¸´ÓÚ2010-05-26 08:24:26±»°æÖ÷ɾ³ý
¶ÔÎÒÓÐÓÃ[0]
¶ª¸ö°åש[0]
ÒýÓÃ
¾Ù±¨
¹ÜÀí
TO ......