主题:那位大哥帮我看下,问题出在那,我是新学的.
procedure TForm1.ListBox1DblClick(Sender: TObject);
var biaoming:string;
begin
biaoming:=Listbox1.Items.Strings[listbox1.Itemindex];
adoquery1.Close;
adoquery1.SQL.Clear;
adoquery1.SQL.Add('select jbxxku from produceid where gonghao=:biaoming');
adoquery1.Open ;
ADOTable1.Close;
adotable1.TableName:=adoquery1.FieldValues['jbxxku'] ;
adotable1.Open
end;
在produceid表里gonghao字段的类型为varchar.
运行时提示:con't convert variant of type.请问问题出在那啊?
var biaoming:string;
begin
biaoming:=Listbox1.Items.Strings[listbox1.Itemindex];
adoquery1.Close;
adoquery1.SQL.Clear;
adoquery1.SQL.Add('select jbxxku from produceid where gonghao=:biaoming');
adoquery1.Open ;
ADOTable1.Close;
adotable1.TableName:=adoquery1.FieldValues['jbxxku'] ;
adotable1.Open
end;
在produceid表里gonghao字段的类型为varchar.
运行时提示:con't convert variant of type.请问问题出在那啊?