B
barry1999
Unregistered / Unconfirmed
GUEST, unregistred user!
请教各位小弟在使用TClientDataSet时遇到下列问题
.......
with ClientDataSet1do
begin
close;
commandtext:='select * from PUB where OPERCODE=:vOperCode';
Params.ParamByName('vOperCode').asString:=edt1.text;
open;
end;
运行时,老是报错‘vOperCode Not Found' why?
在TQUERY中上面的代码都可以啊!!!
后来改为:commandtext:='select * from PUB where OPERCODE='+edt1.text;
运行是又说'datatype mismatch' 但是OPERCODE在数据库里定义的是文本。
请各位帮帮我!!!
.......
with ClientDataSet1do
begin
close;
commandtext:='select * from PUB where OPERCODE=:vOperCode';
Params.ParamByName('vOperCode').asString:=edt1.text;
open;
end;
运行时,老是报错‘vOperCode Not Found' why?
在TQUERY中上面的代码都可以啊!!!
后来改为:commandtext:='select * from PUB where OPERCODE='+edt1.text;
运行是又说'datatype mismatch' 但是OPERCODE在数据库里定义的是文本。
请各位帮帮我!!!