sql:='select * from table1 where mc:=pmc';with adszcyj do
begin
Active:=false;
Parameters.CreateParameter('=pmc',ftstring, pdInput, 16,'') ;
Parameters.ParamByName('=pmc').Value:='xx';
CommandText:=sql;
Active:=true;
end;显示第一行‘mc@P1’附近有语法错误。
begin
Active:=false;
Parameters.CreateParameter('=pmc',ftstring, pdInput, 16,'') ;
Parameters.ParamByName('=pmc').Value:='xx';
CommandText:=sql;
Active:=true;
end;显示第一行‘mc@P1’附近有语法错误。
解决方案 »
- 如何用IHTML接口取得鼠标在webbrowser上移动时的坐标
- delphi 中ado EnableBCD已设为false,但数据小数超过4位的问题 如0.0000001
- DoubleClick事件中如何获取鼠标所在的TTreeview节点
- 为何我用idudp写的C/S软件在本地测试没问题 拿到网络上就不能用了呢?
- Quickrep预览与打印不一致 在线等~
- 用自定义消息,如何在二个进程间传送字符串(在线等待中...)
- 请各位大虾帮忙,我做了个有关dll的东西不知哪里出错!非常急!在线等!
- 在程序中用sql语句在access中增加字段问题!!!!,在线等待
- 50分求一简单代码
- 小弟求救高手!!!
- 随意改变ip地址和DNS服务器地址
- 得到窗体句柄后,如何遍历它上面的控件?
begin
Close;
SQL.Clear;
SQL.Add('select * from table1 where mc:=pmc');
Parameters[0].Value:='xx';
Open;
end;
您的代码是对TADOQuery的吧。我用的是TADODataSet
sql:='select * from table1 where mc ='+#39+'xx'+#39
sql:='select * from table1 where mc=:pmc';with adszcyj do
begin
Active:=false;
CommandText:=sql;
// Parameters.CreateParameter('pmc',ftstring, pdInput, 16,'') ;
Parameters.ParamByName('pmc').Value:='xx';
Active:=true;
end;
改为sql:='select * from table1 where mc=:pmc';