T
Tell_me
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TAdmini_form.B_DeleClick(Sender: TObject);
begin
IF (Trimright(locate_word.Text)=Table1_2['人名']) Then
Begin
With B_Delect do
Begin
Close;
SQL.Clear;
SQL.Add('Delete * from Ren');
SQL.Add('Where Ren.人名='''+locate_word.Text+'''');
ExecSQL;
Admini_form.DBGrid1_T.Refresh;
// Admini_form.Table1_2.Refresh;
Ren_name.Text:='';
En_name.Text:='';
Tell_1.Text:='';
Gs_name.Text:='';
h_z.Text:='';
Add_Edit.Text:='';
End;
End
Else
Begin
Application.MessageBox('不能删除无此数据!','Do not Delete!',Mb_Ok);
Ren_name.Text:='';
En_name.Text:='';
Tell_1.Text:='';
Gs_name.Text:='';
h_z.Text:='';
Add_Edit.Text:='';
end;
end;
我一定要在DBGrid1里面指定这条记录,然后在locate_word.Text里写上这条记录的人名才
能删除。这到底是怎么回事呀?不清楚。请高手指教一下。
begin
IF (Trimright(locate_word.Text)=Table1_2['人名']) Then
Begin
With B_Delect do
Begin
Close;
SQL.Clear;
SQL.Add('Delete * from Ren');
SQL.Add('Where Ren.人名='''+locate_word.Text+'''');
ExecSQL;
Admini_form.DBGrid1_T.Refresh;
// Admini_form.Table1_2.Refresh;
Ren_name.Text:='';
En_name.Text:='';
Tell_1.Text:='';
Gs_name.Text:='';
h_z.Text:='';
Add_Edit.Text:='';
End;
End
Else
Begin
Application.MessageBox('不能删除无此数据!','Do not Delete!',Mb_Ok);
Ren_name.Text:='';
En_name.Text:='';
Tell_1.Text:='';
Gs_name.Text:='';
h_z.Text:='';
Add_Edit.Text:='';
end;
end;
我一定要在DBGrid1里面指定这条记录,然后在locate_word.Text里写上这条记录的人名才
能删除。这到底是怎么回事呀?不清楚。请高手指教一下。