当前位置:主页>销售管理软件> 列表

帮忙看段代码,参数怎么传不过去呀? 找管家婆破解软件下载

库存管理软件版1楼: procedure TQuery1.suiButton1Click(Sender: TObject);
begin
if suiEdit1.Text='''' then Exit;
with DM.DataModule2.qry1 do
begin
SQL.Clear;
SQL.Add(''select * from ClassInfo where ''+suiCombobox1.Text+'' like :pm'''');
if suiRadioButton1.Checked then
Parameters.ParamByName(''pm'').Value := suiEdit1.Text//给参数pm赋值
else
Parameters.ParamByName(''pm'').Value := ''%''+suiEdit1.Text+''%'';//给参数pm赋值
Open;
end;
end;

procedure TQuery1.FormShow(Sender: TObject);
begin
with DM.DataModule2.qry1 do
begin
Close;
SQL.TEXT:=''select * from Classinfo'';
Open;
suiComboBox1.Items.Assign(FieldList);
end;
end;

编译后产生下列错误!要怎么改一下才对呀?
[Error] Query.pas(46): Unterminated string
[Error] Query.pas(47): Missing operator or semicolon
[Error] Query.pas(50): Incompatible types: ''String'' and ''procedure, untyped pointer or untyped parameter''
[Fatal Error] Project1.dpr(11): Could not compile used unit ''Query.pas''

2楼: suiComboBox1.Items.Assign(FieldList);???????????????/ 如管家婆破解软件下载

3楼: 老大,你的代码真个性

4楼: procedure TQuery1.suiButton1Click(Sender: TObject);
begin
if suiEdit1.Text='''' then Exit;
with DM.DataModule2.qry1 do
begin
SQL.Clear;
SQL.Add(''select * from ClassInfo where ''+suiCombobox1.Text+'' like :pm''[green][b]);//去掉一个单引号[/b][/green] if suiRadioButton1.Checked then
Parameters.ParamByName(''pm'').Value := suiEdit1.Text//给参数pm赋值
else
Parameters.ParamByName(''pm'').Value := ''%''+suiEdit1.Text+''%'';//给参数pm赋值
Open;
end;
end;

5楼: DM.DataModule2.qry1 ?????
是不是前面多了点什么呀????

6楼: ''select * from ClassInfo where ''+suiCombobox1.Text+'' like ''''''+ :pm+''''''''

库存管理软件版7楼: 接受答案了.