i have this code :
procedure :
CREATE OR REPLACE PACKAGE BODY PKG_ARRAY AS PROCEDURE PARAAJA_BULK(P_INPUTS IN PARAAJAARRAY)
IS BEGIN
FOR I IN 1 .. P_INPUTS.COUNT LOOP
INSERT INTO PARA_AJA
(FIELD1, FIELD2)
VALUES
(P_INPUTS(I).FIELD1, P_INPUTS(I).FIELD2);
END LOOP; END;
END;
and scala code :
def spArray(name: List[person2],con:Connection) = Future[Boolean] { //supaya output jadi Future
DriverManager.registerDriver(new OracleDriver())
val conn = DriverManager.getConnection("jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxx)(PORT=xxxx))(CONNECT_DATA=(SERVER=dedicated)(SERVICE_NAME=xxxx)))", "tesschema", "1234")
var callableStatement: CallableStatement = conn.prepareCall("call PKG_ARRAY.PARAAJA_BULK(?)")
val des = ArrayDescriptor.createDescriptor("PKG_ARRAY.PARAAJAARRAY", conn)
val array_to_pass = new ARRAY(des, conn, name)
callableStatement.setArray(1, array_to_pass)
callableStatement.execute()
}
but ,i have problem !!
invalid name pattern: PKG_ARRAY.PARAAJAARRAY
...