仔细看一下你的SQL语句里面到底有没有MyPicture参数!是参数不是字段! 例如:select * from Yourtable where yourpicture=:MyPicture 然后才可以。当然要注意字段类型。
是ADO还是BDE? with ADOQuery do begin close; commandtext:='select * from table where fileds=:myPicture'; parameters.parambyname('MyPicture').value:=edit1.text; open; end; with query1 do begin close; sql.clear; sql.add('select * from table where fields=:mypicture'); parambyname('mypicture').asstring:=edit1.text; open; end; 你说的可能是ADO的错误。
例如:select * from Yourtable where yourpicture=:MyPicture
然后才可以。当然要注意字段类型。
with ADOQuery do
begin
close;
commandtext:='select * from table where fileds=:myPicture';
parameters.parambyname('MyPicture').value:=edit1.text;
open;
end;
with query1 do
begin
close;
sql.clear;
sql.add('select * from table where fields=:mypicture');
parambyname('mypicture').asstring:=edit1.text;
open;
end;
你说的可能是ADO的错误。