Dear all,
I'm trying to call a HANA function via JDBC and receive error 328 "invalid name of function or procedure" although the function exists in the catalog and is accessible.
Let's define an example:
create function myfunc ( in inpar1 varchar(30), in inpar2 varchar(30)) returns outpar1 varchar(30) as
begin outpar1 := concat(left(inpar1,1),inpar2); end
The following JDBC call leads to an exception with error 328.
String storeFunc = "{? = call myfunc(?,?)}";
try {
callableStatement = connection.prepareCall(storeFunc);
} catch (SQLException e) {
System.out.println(e.getMessage());
}
The almost identical coding works well when calling a HANA procedure.
Again an example:
create procedure myproc (in inpar1 varchar(30), in inpar2 varchar(30),out outpar1 varchar(30)) as
begin outpar1 := concat(left(inpar1,1),inpar2); end
The following JDBC call works as expected:
String storeProc = "{call myproc(?,?,?)}";
try {
callableStatement = connection.prepareCall(storeProc);
} catch (SQLException e) {
System.out.println(e.getMessage());
}
Does anybody have an idea to resolve this problem ?
Thanks in advance !
Best regards
Florian