Private@H_404_2@ @H_404_2@Sub@H_404_2@ Command1_Click()
@H_404_2@For@H_404_2@ i @H_404_2@=@H_404_2@ @H_404_2@0@H_404_2@ @H_404_2@To@H_404_2@ @H_404_2@5@H_404_2@
Text1(i).Text @H_404_2@=@H_404_2@ @H_404_2@""@H_404_2@
@H_404_2@Next@H_404_2@ i
Adodc1.RecordSource @H_404_2@=@H_404_2@ @H_404_2@"@H_404_2@select * from @H_404_2@"@H_404_2@ @H_404_2@&@H_404_2@ s1 @H_404_2@&@H_404_2@ @H_404_2@"@H_404_2@ order by 编号@H_404_2@"@H_404_2@
Adodc1.Refresh
@H_404_2@If@H_404_2@ Adodc1.Recordset.RecordCount @H_404_2@>@H_404_2@ @H_404_2@0@H_404_2@ @H_404_2@Then@H_404_2@
Adodc1.Recordset.MoveLast
Text1(@H_404_2@0@H_404_2@).Text @H_404_2@=@H_404_2@ @H_404_2@"@H_404_2@G@H_404_2@"@H_404_2@ @H_404_2@+@H_404_2@ @H_404_2@Format@H_404_2@((@H_404_2@Val@H_404_2@(@H_404_2@Right@H_404_2@(@H_404_2@Trim@H_404_2@(Adodc1.Recordset.Fields(@H_404_2@"@H_404_2@编号@H_404_2@"@H_404_2@)),@H_404_2@4@H_404_2@)) @H_404_2@+@H_404_2@ @H_404_2@1@H_404_2@),@H_404_2@"@H_404_2@0000@H_404_2@"@H_404_2@)
@H_404_2@Else@H_404_2@
Text1(@H_404_2@0@H_404_2@).Text @H_404_2@=@H_404_2@ @H_404_2@"@H_404_2@G0001@H_404_2@"@H_404_2@
@H_404_2@End@H_404_2@ @H_404_2@If@H_404_2@
@H_404_2@End Sub@H_404_2@
@H_404_2@Private@H_404_2@ @H_404_2@Sub@H_404_2@ Command2_Click()
@H_404_2@If@H_404_2@ Adodc1.Recordset.EOF @H_404_2@=@H_404_2@ @H_404_2@False@H_404_2@ @H_404_2@Then@H_404_2@
c @H_404_2@=@H_404_2@ @H_404_2@MsgBox@H_404_2@(@H_404_2@"@H_404_2@您确认要删除该记录吗?@H_404_2@"@H_404_2@,vbOKCancel,@H_404_2@"@H_404_2@删除提示信息@H_404_2@"@H_404_2@)
@H_404_2@If@H_404_2@ c @H_404_2@=@H_404_2@ vbOK @H_404_2@Then@H_404_2@
Adodc1.Recordset.Delete
Adodc1.RecordSource @H_404_2@=@H_404_2@ @H_404_2@"@H_404_2@select * from 人员表@H_404_2@"@H_404_2@
Adodc1.Refresh
@H_404_2@End@H_404_2@ @H_404_2@If@H_404_2@
@H_404_2@Else@H_404_2@
@H_404_2@MsgBox@H_404_2@ @H_404_2@"@H_404_2@当前数据库中没有可删除的数据记录@H_404_2@"@H_404_2@,vbOKOnly,@H_404_2@"@H_404_2@提示信息@H_404_2@"@H_404_2@
@H_404_2@End@H_404_2@ @H_404_2@If@H_404_2@
@H_404_2@End Sub@H_404_2@
@H_404_2@Private@H_404_2@ @H_404_2@Sub@H_404_2@ Command3_Click()
@H_404_2@If@H_404_2@ Text1(@H_404_2@0@H_404_2@).Text @H_404_2@=@H_404_2@ @H_404_2@""@H_404_2@ @H_404_2@Or@H_404_2@ Text1(@H_404_2@1@H_404_2@).Text @H_404_2@=@H_404_2@ @H_404_2@""@H_404_2@ @H_404_2@Then@H_404_2@
@H_404_2@MsgBox@H_404_2@ @H_404_2@"@H_404_2@请选择需要改动的记录信息!@H_404_2@"@H_404_2@,@H_404_2@"@H_404_2@错误提示@H_404_2@"@H_404_2@
@H_404_2@Else@H_404_2@
c @H_404_2@=@H_404_2@ @H_404_2@MsgBox@H_404_2@(@H_404_2@"@H_404_2@确定要修改该记录吗?@H_404_2@"@H_404_2@,@H_404_2@"@H_404_2@提示信息@H_404_2@"@H_404_2@)
@H_404_2@If@H_404_2@ c @H_404_2@=@H_404_2@ vbOK @H_404_2@Then@H_404_2@ @H_404_2@'@H_404_2@如果确认修改的话进行修改操作@H_404_2@
@H_404_2@ @H_404_2@If@H_404_2@ Text1(@H_404_2@1@H_404_2@).Text @H_404_2@=@H_404_2@ @H_404_2@""@H_404_2@ @H_404_2@Then@H_404_2@
@H_404_2@MsgBox@H_404_2@ @H_404_2@"@H_404_2@姓名不能为空值!@H_404_2@"@H_404_2@,@H_404_2@48@H_404_2@,@H_404_2@"@H_404_2@修改信息提示@H_404_2@"@H_404_2@
@H_404_2@Else@H_404_2@
@H_404_2@'@H_404_2@连接所要修改的数据库@H_404_2@
@H_404_2@ con.Open @H_404_2@"@H_404_2@Provider=sqlOLEDB.1;Password=2752;Persist Security Info=True;User ID=sa;Initial Catalog=sample;Data Source=JAMLEEPC@H_404_2@"@H_404_2@
@H_404_2@'@H_404_2@开始修改数据库@H_404_2@
@H_404_2@ con.Execute (@H_404_2@"@H_404_2@UPDATE @H_404_2@"@H_404_2@ @H_404_2@&@H_404_2@ s1 @H_404_2@&@H_