with DModule do
begin
adoq_share.Close;
adoq_share.SQL.Clear;
adoq_share.SQL.Add('select * from depot where depot_name=:A');
adoq_share.Parameters.ParamByName('A').Value:=trim(cbox.Text);
adoq_share.Open; if adoq_share.Eof then
begin
messagebox(0,'机房名错误,请确定','信息提示',mb_ok+mb_iconwarning);
exit;
end else
begin ADOQ_share.Edit;
adoq_share.Delete;
adoq_share.Post; adoq_share.Close;
adoq_share.SQL.Clear;
adoq_share.SQL.Add('select * from computer where depot_name=:A');
adoq_share.Parameters.ParamByName('A').Value:=trim(cbox.Text);
adoq_share.Open; ADOQ_share.Edit;
while not adoq_share.Eof do
begin
adoq_share.Delete;
adoq_share.Post;
end;
IF messagebox(0,'删除成功,您还需要操作吗?',
'信息提示',mb_yesno+mb_defbutton2+mb_iconquestion)=idyes then
begin
cbox.Items.Delete(cbox.ItemIndex);
exit;
end else
begin
close;
end; end;
end;
begin
adoq_share.Close;
adoq_share.SQL.Clear;
adoq_share.SQL.Add('select * from depot where depot_name=:A');
adoq_share.Parameters.ParamByName('A').Value:=trim(cbox.Text);
adoq_share.Open; if adoq_share.Eof then
begin
messagebox(0,'机房名错误,请确定','信息提示',mb_ok+mb_iconwarning);
exit;
end else
begin ADOQ_share.Edit;
adoq_share.Delete;
adoq_share.Post; adoq_share.Close;
adoq_share.SQL.Clear;
adoq_share.SQL.Add('select * from computer where depot_name=:A');
adoq_share.Parameters.ParamByName('A').Value:=trim(cbox.Text);
adoq_share.Open; ADOQ_share.Edit;
while not adoq_share.Eof do
begin
adoq_share.Delete;
adoq_share.Post;
end;
IF messagebox(0,'删除成功,您还需要操作吗?',
'信息提示',mb_yesno+mb_defbutton2+mb_iconquestion)=idyes then
begin
cbox.Items.Delete(cbox.ItemIndex);
exit;
end else
begin
close;
end; end;
end;
解决方案 »
- 中国象棋如何判断将死
- indy udpserver 封装在dll中,但是无法触发 UDPRead 接收事件!
- 请教:有关IdTCPServer和IdTCPClient如何处理和发送带参数的命令?
- 没有没学习DELPHI的QQ群?
- 找devexpress for xe2
- Delphi中有没有能在自己的程序中打开Word文档(Text也要)和Excel文件的控件?
- 在ADODataSet字段列表中;新增New Lookup字段后经常出现“出现未知错误”求解。
- delphi的面象对象和c++的怎末差这么多啊?
- QUERY查询怪症?????
- 如何消除控件被左击时出现的边框?
- 怎样才能确保我自定义的服务程序,在mysql服务启动完之后启动?
- 如何在DELPHI7中实现CAD那样的画线??
if DataSet.State in dsEditModes then
DataSet.Post;