Menu

#1372 Can't call callable with JDBC{?=call proc()} pattern

current-release
open
None
5
2020-09-07
2014-10-17
gbonk
No

Cross posting aparent bug.... https://sourceforge.net/p/hsqldb/feature-requests/309/

Connection c = jdbcTemplate.getDataSource().getConnection();

        String sql = "{?= call PAR3214.VOID_ALLOCATION(?, ?, ?)}";

        CallableStatement  s = c.prepareCall(sql);

        s.registerOutParameter(1, Types.VARCHAR);
        s.setLong(2, fromLocation);
        s.setString(3, controlNumber);
        s.setString(4, controlNumber);

        boolean b = s.execute();

Straight JDBC in Oracle, fails in HSQLDB

Definition of function is as follows...

CREATE SCHEMA par3214;

CREATE FUNCTION par3214.void_allocation (virt_wh_in NUMERIC, control_nbr_in VARCHAR(10), user_id_in VARCHAR(10))
RETURNS VARCHAR(10)
RETURN 'OK'

Discussion

  • gbonk

    gbonk - 2014-10-17

    OK, I jumped the gun on this as apparently this is just 'not supported' yet

     
  • Fred Toussi

    Fred Toussi - 2020-09-07
    • summary: Can't call callable with return value --> Can't call callable with JDBC{?=call proc()} pattern
    • assigned_to: Fred Toussi
     

Log in to post a comment.