本文介绍了在Java中用空数据填充的oracle数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试向oracle存储过程中抛出一个字符串数组时:

When I try to throw an Array of strings to oracle stored procedure as:

String arrStr[] ={"val1","val2","val3"};
ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("STR_ARRAY", connection );

oracle.sql.ARRAY oracleArray = new oracle.sql.ARRAY(descriptor, connection, arrStr);

oracleArray保存空数据,oracleArray.datumArray = {???,???,???}

oracleArray holds null data , oracleArray.datumArray = {???,???,???}

推荐答案

就我而言(请参阅上面的评论),它是由编码问题引起的,但是-没有任何异常或调试信息.将orai18n.jar包含到项目库中可以解决此问题...真是可悲,没有任何异常或表明如何解决问题的东西

In my case (see my comment above), it was caused by encoding problem, however - without any exception or debug information. Including orai18n.jar to the project libraries solved this... it is really sad, there is no exception or something that would indicate how to solve the problem

这篇关于在Java中用空数据填充的oracle数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 13:58