(delphi源码)自动编号增加的源码.docxVIP

  • 61
  • 0
  • 约1.77千字
  • 约 2页
  • 2021-11-07 发布于江苏
  • 举报
自动编号增加的源码 procedure Tfrm_xingzhen.Button4Click(Sender: TObject); var counter:integer; id,id1:string; begin IF application.MessageB你ox要(新增村名?,操作提示,mb_okcancel+mb_iconinformation) =IDOK then begin with maxno2 do begin close; sql.Clear; sql.Text:=select max(xzid) from xingzhen; open; id1:=maxno2.fields[0].asstring; if id1 then begin counter:=strtoint(id1); counter:=counter+1; id:=0+inttostr(counter); id:=copy(id,length(id)-1,2); end else id:=01; end; edit4.Text:=id; edit5.Text:=id1; with xingzhenado2 do begin Close; SQL.Clear ; SQL.text:=insert into xingzhen(xzid,mingzheng) ; SQL.Add(values (:xz

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档