Dear all:
 this is my function for test
 ----
create or replace function sf_tmp(v_out out PK_TYPE.cur) return int as
begin
  open v_out for
    select 'aaa' as name_, 100 as num_
      from dual
    union all
    select 'bbb' as name_, 200 as num_
      from dual
    union all
    select 'ccc' as name_, 300 as num_
     from dual;
  return 0;
 end;
 ----
 and this is my code for test
 ----
        session sql(oracle, "service=LOTEST user=newbie password=newbie");
         int ret;
         row r;
        statement cur(sql);
         statement proc = (sql.prepare << "begin :v_ret := sf_tmp( :v_cur ); 
end;",
                                                use(ret, "v_ret"),
                                                use(cur, "v_cur") );
         cur.exchange(into(r));
        
         proc.execute(true);
         cur.describe();
         cout << "ret = " << ret << endl;
         cout << "row size = " << r.size() << endl;
  while ( cur.fetch() ){ ... };  // <---- Error: ORA-24374: define not done 
before 
 fetch or execute and fetch
 
----
 
I got r.size() equals 2, that is correct;
but still I have no idea to fetch any data from the cursor, help me please~
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to