Hi Nesh, Hi Team
we are currently testing our product (build with PB2017R3) with ORACLE 18c.
We notice problems with "RPCFUNC" passing "pl/sql tables". So we notice problems
with passing "ARRAYS" in and out to Oracle stored procedures/functions.
This problem is new and not happen then we run our product with a ORACLE Server 12.x or lower.
Best regards.
Frank
Some Details we find out:
DBMS=trace ORA Oracle
this Error comes only on Oracle 12c Servers:
0ED62440): EXECUTE REMOTE PROCEDURE: IMS.gm_insert.getAttribValuesByIds
ARRAY TYPE VCHAR
ARRAY TYPE VCHAR REFERENCE
ARRAY TYPE LONG
ARRAY TYPE LONG
(0ED62440): BEGIN :rc := IMS.gm_insert.getAttribValuesByIds( :0,:1,:2,:3); END; (0.000 MS / 1533.062 MS)
(0ED62440): *** ERROR 932 ***(rc -1) : ORA-00932: Inkonsistente Datentypen: %s erwartet, %s erhalten
(0ED62440): ORA-00932: Inkonsistente Datentypen: %s erwartet, %s erhalten
(0.000 MS / 1533.062 MS)
(0ED62440): *** ERROR 932 ***(rc -1) : ORA-00932: Inkonsistente Datentypen: %s erwartet, %s erhalten
(15.668 MS / 1548.730 MS)
(0ED62440): *** ERROR 932 ***(rc -1) : ORA-00932: Inkonsistente Datentypen: %s erwartet, %s erhalten
Implementation Infos:
We have Oracle Package Signatures like this:
Oracle PL/SQL:
CREATE OR REPLACE PACKAGE "GM_INSERT" is
/*==============================================================*/
/* Created on: 25.01.05 08:00:00 */
/* Modified on: 22.01.18 10:06:00 */
/* Version : initial Version 1.0c */
/*==============================================================*/
TYPE T_VARCHAR2_ARRAY is TABLE of vd_attrib.vd_valuestring%TYPE index by binary_integer;
TYPE T_NUMBER_ARRAY is TABLE of NUMBER index by binary_integer;
function getAttribValuesById(
a_tagStringList_in in T_VARCHAR2_ARRAY,
a_valueStringList_out out T_VARCHAR2_ARRAY,
a_obj_id in object.obj_id%type Default null,
a_insert_id in vd_insert.vd_id%TYPE Default null
) return Number;
function getAttribValuesByIds(
a_tagStringList_in in T_VARCHAR2_ARRAY,
a_valueStringList_out out T_VARCHAR2_ARRAY,
a_obj_ids in T_NUMBER_ARRAY,
a_insert_ids in T_NUMBER_ARRAY
) return Number;
And calls from our product (build with PB2017R3) like this:
function double dbf_insert_getAttribValuesById(string a_tagStringList_in[], REF string a_valueStringList_out[], long a_obj_id , long a_insert_id) RPCFUNC ALIAS FOR "IMS.gm_insert.getAttribValuesById"
function double dbf_insert_getAttribValuesByIds(string a_tagStringList_in[], REF string a_valueStringList_out[], long a_obj_ids[] , long a_insert_ids[]) RPCFUNC ALIAS FOR "IMS.gm_insert.getAttribValuesByIds"
Implemented like this:
public function long uof_getattribvaluesbyid (string as_tagstringlist_in[], ref string as_valuestringlist_out[], long al_obj_id, long al_insert_id)
/* Funktion getAttribValues
* Liefert zu einem Insert (a_insert_id) alle Attribute
* tagstring (as_tagStringList_out[]) und valuestring (as_valueStringList_out[]).
* den es platziert ist (Figure (Standort).
* a_array_size: die Groesse des übergebenden Powerbuilder Arrays
* Return: Anzahl der Attribute, im Fehlerfalll -1
*/
long ll_return_rowcount
long ll_fetchsize
long ll_insert_id
long ll_obj_id
long ll_upperbound
long ll_cnt
string ls_valueStringList_out[], ls_empty_list[]
ll_insert_id = al_insert_id
ll_obj_id = al_obj_id
ll_fetchsize = Upperbound(as_tagstringlist_in[])
//Übergabespeicher reservieren
FOR ll_cnt=ll_fetchsize to 1 step -1
ls_valueStringList_out[ll_cnt]=space(512)
NEXT
//retrieve
if ll_fetchsize > 0 then
ll_return_rowcount = this.dbf_insert_getAttribValuesById(as_tagStringList_in[], REF ls_valueStringList_out[], al_obj_id, al_insert_id)
end if
ll_upperbound = upperbound(ls_valueStringList_out)
//Leerstellen der Reservierung entfernen
FOR ll_cnt=1 TO ll_upperbound
ls_valueStringList_out[ll_cnt] = RightTrim(ls_valueStringList_out[ll_cnt])
NEXT
//out
as_valueStringList_out[] = ls_valueStringList_out[] //copy to out buffer
ls_valueStringList_out[] = ls_empty_list[] //clear mem
return (ll_return_rowcount)