sebigansca
Programmer
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
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