DB2 - Problem description
Problem IT08814 | Status: Closed |
SQL0408N RETURNED TO A PL/SQL FUNCTION CALLED WITH ARRAY PARAMETER. | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
PL/SQL Function: create or replace package body test_schema.test_pkg is function f_use_array(p_arr IN g_array_typ) return varchar2 is l_value varchar2(20); begin for i in p_arr.first .. p_arr.last loop l_value := l_value || ' ' || p_arr(i); end loop; return l_value; end; Java application calling the Function: call_fun_stmt = "BEGIN ? := TEST_SCHEMA.TEST_PKG.F_USE_ARRAY(?); fails with 'SQL0408N A value is not compatible with the data type of its assignment target' error. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All DB2 V10.5 users * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 V10.5 Fix Pack 7 or higher. * **************************************************************** | |
Local Fix: | |
Call the parameter marker with cast to the array data type: BEGIN ? := TEST_SCHEMA.TEST_PKG.F_USE_ARRAY(cast(? as test_schema.test_pkg.g_array_typ) | |
Solution | |
Fixed in DB2 V10.5 Fix Pack 7. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 08.05.2015 22.01.2016 22.01.2016 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.5.0.7 |