zoukankan      html  css  js  c++  java
  • popmenu的例子

    var
    r_id :string;
    begin
    if Qry.FieldByName('code1').AsString<>'' then
    begin
        if (Application.MessageBox('确认删除?', '提示', MB_YESNO+mb_iconinformation)=IDYES) then
        begin
          r_id:=Qry.fieldByName('id').AsString;
          del_ado.Connection.BeginTrans;
          try
            with del_ado do
            begin
              del_ado.Close;
              del_ado.SQL.Clear();
              del_ado.SQL.Add('delete from u_qianyue where r_id='''+r_id+'''');
              del_ado.ExecSQL;

              del_ado.SQL.Clear();
              //删除完u_qianyue表中的记录后,更新u_report表中的签约日期和过户日期为空
              del_ado.SQL.Add('update u_report set bargain_date = null,register_date = null where id='''+r_id+'''');
              del_ado.ExecSQL;
              showmessage('删除成功!');
              del_ado.Connection.CommitTrans;
              btnQueryClick(self);
            end;
          except
            on E: Exception do
            begin
            del_ado.Connection.RollbackTrans; //如有异常,事务回滚
            ShowMessage(E.Message);
            end
          end;
         { try
            del_ado.Connection.BeginTrans;//.begainTrans;   //BeginTransComplete
            //on Error Goto ErrNum
            del_ado.Close;
            del_ado.SQL.Clear();
            del_ado.SQL.Add('delete from u_qianyue where r_id='''+r_id+'''');
            del_ado.ExecSQL;

            del_ado.SQL.Clear();
            //删除完u_qianyue表中的记录后,更新u_report表中的签约日期和过户日期为空
            del_ado.SQL.Add('update u_report set bargain_date = null,register_date = null where id='''+r_id+'''');
            del_ado.ExecSQL;
            showmessage('删除成功!');
            del_ado.Connection.CommitTrans;
            btnQueryClick(self);
          except
            del_ado.Connection.RollBackTrans;
          end; }
        end;
    end;
    end;

  • 相关阅读:
    eclipse提速01
    eclipse提速02
    快速清空Access资料库中所有表的数据
    删除数据之后自增长列重新开始计数
    JS中控制两个小数位
    JS控制table中tr位置互换
    MIME 类型列表
    JS中对于email格式的判断
    获取网站根目录的方法
    通过存储过程创建SQL作业
  • 原文地址:https://www.cnblogs.com/martian6125/p/9631450.html
Copyright © 2011-2022 走看看