Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to retrive a row type returned by spl

Status
Not open for further replies.

sebigansca

Programmer
Aug 31, 2006
1
RO
hy
i'm new to informix, and i want to execute a function ( routine ) from a c++ program using object interface c++
class : ITRoutineManager, but my program freez in ExecForValue function

Here are the spl :

create function sptest(i int) RETURNS returnRow;

DEFINE v1_bicsursa char(8);
DEFINE v1_tipmesaj char(5);

DEFINE retRow returnRow;

select first 1 bicsursa, tipmesaj INTO v1_bicsursa,v1_tipmesaj from output;

LET retRow = ROW( v1_bicsursa, v1_tipmesaj)::returnRow;

return retRow;

end function with listing in '/tmp/ifx_warn_file';

returnRow is declared as follows :
create row type returnrow (
v_bicsursa CHAR(8),
v_tipmesaj CHAR(5))

and my c++ prg is :
ITConnection conn;
ITRoutineManager routine( conn );
routine.GetRoutine( "function sptest( int )" );
cout << routine.ResultType()->Name(); //this work and print : returnRow

ITValue *v1, *v2;
v1 = routine.Param( 0 );
v1->FromPrintable( "1" );
v1->Release();

v2 = routine.ExecForValue(); //here the prg freezes

10x
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top