This discussion is archived
6 Replies Latest reply: Oct 31, 2007 8:07 AM by 807592 RSS

java.sql.SQLException: invalid name pattern

807590 Newbie
Currently Being Moderated
Hi all,
I have an Oracle procedure defined like:

pkgoms.p_oms_audit ( in_tab_oms_audit in tab_oms_audit,out_status out number)

tab_oms_audit is a collection of t_oms_audit

Here is the structure for the type

create or replace type t_oms_audit as object(
Username_ VARCHAR2(101),
d_Date_ Date,
<other fields>) ;

I've tried to use the procdure in Java like:
anOracleCallableStatement=(OracleCallableStatement) conn.prepareCall("call pkgoms.p_oms_audit(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); 
/* Got this error at the following line: 
java.sql.SQLException: invalid name pattern: T_OMS_AUDIT.USERNAME 
     at oracle.jdbc.dbaccess.DBError.throwSqlException( 
oracle.sql.ArrayDescriptor usernameDesc = oracle.sql.ArrayDescriptor.createDescriptor("T_OMS_AUDIT.USERNAME", conn); 
// Got the same "invalid name pattern" when tried like this             
//oracle.sql.ArrayDescriptor usernameDesc = oracle.sql.ArrayDescriptor.createDescriptor("TAB_OMS_AUDIT.USERNAME", conn); 
Does anybody know how should I use the name of procedure in my Java code? Any help is greatly appreciated.