太
太保球
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.ListBox1DblClick(Sender: TObject);
begin
ADOTable1.edit;
adoquery1.close;
adoquery1.SQL.Clear;
adoquery1.SQl.Add('insert into 表1 (xiaoshou,kehu,xingbie,nianling) select xiaoshou,kehu,xingbie,nianling from 表2,表3');
adoquery1.SQl.Add('where kehu='''+listbox1.Items.text+'''');
~~~~~~~~~~~~~~~~~~~~
adoquery1.SQl.Add('and xiaoshou='''+combobox2.Text+'''');
adoquery1.Prepared:=true;
adoquery1.ExecSQL;
adotable1.Close;
adotable1.open;
adotable1.Last;
end;
画线部分,改为combobox1.text 就可以啊。到底怎么用LISTBOX实现啊。
begin
ADOTable1.edit;
adoquery1.close;
adoquery1.SQL.Clear;
adoquery1.SQl.Add('insert into 表1 (xiaoshou,kehu,xingbie,nianling) select xiaoshou,kehu,xingbie,nianling from 表2,表3');
adoquery1.SQl.Add('where kehu='''+listbox1.Items.text+'''');
~~~~~~~~~~~~~~~~~~~~
adoquery1.SQl.Add('and xiaoshou='''+combobox2.Text+'''');
adoquery1.Prepared:=true;
adoquery1.ExecSQL;
adotable1.Close;
adotable1.open;
adotable1.Last;
end;
画线部分,改为combobox1.text 就可以啊。到底怎么用LISTBOX实现啊。