我的查询代码:
begin
if edit1.Text='' then
showmessage('请入图书证号')
else
begin F_DM.Cds_clsoder.Close;
F_DM.Cds_clsoder.CommandText:='select * from clsoder where class_master='+edit1.Text;
F_DM.Cds_clsoder.Execute;
F_DM.Cds_clsoder.Open;
F_DM.Cds_clsoder.Refresh;
end;
end;
查询结果出错提示:project client.exe raise exception class EOleException with message '列名'11225'无效'。process stop....
无法查到当图书证号为:11225时所有的对应记录。请高手指点。谢谢!
begin
if edit1.Text='' then
showmessage('请入图书证号')
else
begin F_DM.Cds_clsoder.Close;
F_DM.Cds_clsoder.CommandText:='select * from clsoder where class_master='+edit1.Text;
F_DM.Cds_clsoder.Execute;
F_DM.Cds_clsoder.Open;
F_DM.Cds_clsoder.Refresh;
end;
end;
查询结果出错提示:project client.exe raise exception class EOleException with message '列名'11225'无效'。process stop....
无法查到当图书证号为:11225时所有的对应记录。请高手指点。谢谢!
F_DM.Cds_clsoder.Open;只用下面那句就可以了吧 。
我要求是当在Edit1.text中输入图书证号时,在DBgrid中显示出与图书证号相对应的所有记录。
F_DM.Cds_clsoder.Execute;
F_DM.Cds_clsoder.Open;
也一样出错,怎么办?十分感谢!
F_DM.Cds_clsoder.CommandText:='select * from clsoder where class_master='
+ QuotedStr(edit1.Text);
F_DM.Cds_clsoder.CommandText:='select * from clsoder where class_master='''+edit1.Text+'''';
F_DM.Cds_clsoder.CommandText:='select * from clsoder where class_master='
+ '''' + edit1.Text + '''' ;