ADOQuery2.Close;
ADOQuery2.SQL.Clear;
ADOQuery2.SQL.Add('Select * From 进货信息历史表 where '+ComboBox3.Items[ComboBox3.ItemIndex]+' Like :A');
ADOQuery2.Parameters.ParamByName('A').Value :=Edit1.Text+'%';
ADOQuery2.Open;
...全文
4669打赏收藏
错在哪里了?为什么提示“应用程序在当前操作中使用了错误类型的值”?
ADOQuery2.Close; ADOQuery2.SQL.Clear; ADOQuery2.SQL.Add('Select * From 进货信息历史表 where '+ComboBox3.Items[ComboBox3.ItemIndex]+' Like :A'); ADOQuery2.Parameters.ParamByName('A').Value :=Edit1.Text+'%'; ADOQuery2.Open;
if (ComboBox3.Items[ComboBox3.ItemIndex]='单据编号') or (ComboBox3.Items[ComboBox3.ItemIndex]='商品编号') or (ComboBox3.Items[ComboBox3.ItemIndex]='数量')
or (ComboBox3.Items[ComboBox3.ItemIndex]='仓库编号') then
begin
ADOQuery2.Close;
ADOQuery2.SQL.Clear;
ADOQuery2.SQL.Add('Select * From 进货信息历史表 where '+ComboBox3.Items[ComboBox3.ItemIndex]+' Like :A');
ADOQuery2.Parameters.ParamByName('A').Value :=quotedstr(Edit1.Text)+'%';
ADOQuery2.Open;