Showing results for 
Search instead for 
Did you mean: 

Not able to call sql function from T4EA

Solution Partner Experimenter Solution Partner Experimenter
Solution Partner Experimenter

I have following sql function in database




where PA is the package and fc_return_number is the function.


When I'm calling above function from T4EA using following code, the resultset return 1 but I'm not able to read return value returning from the function.


tplet statement $Conn prepareStatement "begin ? := PA.fc_return_number(); end;"
tpwith $statement setQueryTimeout $::T4EA::JDBC::ORACLE::CtrlParam(queryTimeout)
# set parameters:
tpwith $statement setNUMBER 1
tplet Result $statement executeUpdate
tplet Oraclereturn $statement getNUMBER 1


It throws following exception.


::T4EA::CUSTOM::ORACLE::logException: Invocation of the OraclePreparedStatementWrapper.getNUMBER() method failed because no such method could be found
::T4EA::CUSTOM::ORACLE::logException: while executing
::T4EA::CUSTOM::ORACLE::logException: "Unmarshall myVar [eval ::T4X::JAVASERVER::sExecute $serverHandle with $handle $methodName $args]"
::T4EA::CUSTOM::ORACLE::logException: (procedure "tplet" line 17)
::T4EA::CUSTOM::ORACLE::logException: invoked from within
::T4EA::CUSTOM::ORACLE::logException: "tplet oracleReturn $statement getNUMBER 1