query1.sql.add('select * from 数据库名 where xh=:p_xh');
query1.parambyname('p_xh').value:=你所需要的值
我这样写应该是没错的

解决方案 »

  1.   

    query1.SQL.Add('select sgdwm,logname from webuser where xh =:xh');
    query1.parambyname('xh').asstring:=webxh;
    、//上面的代码应该可以的。不过我这里没有oracle8.04
    ...........
      你试一下:
    query1.SQL.Add('select sgdwm,logname from webuser where xh =:@xh');
    query1.parambyname('@xh').asstring:=webxh;
      

  2.   

    在这里先感谢各位的大力支持。
    我晚上有试了一次。这次的环境不同。是:windows nt 4.0 server.delphi,数据库是ORACLE8。0。但这次就成功了。我搞不明白究竟是和什么东西有关。是ODBC,还是oracle.
    请各位高手能为我解决疑惑
      

  3.   

    >>query1.SQL.Add('select sgdwm,logname from webuser where xh =“10000”');
                                                                   ^^^^^^^^^^
    好象应该是这样:                                             =''10000'');