"strSql :='select * from tcs.department where tcs.department.DEPNAME=:temp1';
    open dep_cur for strSql using depName;" 
--Oracle中就是这么用的啊. 语句中有一个参数,执行的时候就用depName来替代那个参数.,

解决方案 »

  1.   

    oracle就是这样进行参数传递的!
      

  2.   

    strSql :='select * from tcs.department where tcs.department.DEPNAME=:temp1';
        open dep_cur for strSql using depName;
    用depName来替换:temp1,这是oracle中的参数邦定,这样的语句执行的效率高。
      

  3.   

    但是如果返回不是游标的时候用前面的一种方法也是可以返回正确的结果的,比如select count(*)from Department where DEPNAME=aName,返回一个int型的。
    不知道为什么!!