使用odac连接oracle,以前使用变量绑定是可以查询的.最近改了oracle的oci.dll几个文件,现在似乎没办法进行变量绑定了.用PHP+ORACLE 也是同样没办法进行变量绑定.晕~~~
     
把vps_str1:='select * from data0050 where data0050.customer_part_number=:pn1';
这句改成下面这句就查询出来了
vps_str1:='select * from data0050 where data0050.customer_part_number='''+v_pn+''';
-----------------------------------------------------------------------------------
代码如下:      if trim(edit1.Text)='' then
        showmessage('请输入生产编号!')
      else
        v_pn:=UpperCase(edit1.Text);      vps_str1:='select * from data0050 where data0050.customer_part_number=:pn1';
      try
        with oraQuery1 do begin
         close;
         sql.Text:=vps_str1;         Params.ParamByName('pn1').DataType :=ftString;
         Params.ParamByName('pn1').Value:=v_pn;         Open;
       end;
      except
         begin
            oraQuery1.Close;
            showmessage('查询出错!');
         end;
      end;