dbTalk Databases Forums  

java.sql.SQLException: ORA-01036: illegal variable name/number

comp.database.oracle comp.database.oracle


Discuss java.sql.SQLException: ORA-01036: illegal variable name/number in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
avinash
 
Posts: n/a

Default java.sql.SQLException: ORA-01036: illegal variable name/number - 02-20-2004 , 06:31 AM






Hi,

I have a simple java classes trying to call a function in a database.
Below is the function signature.

function search_pipe_out
(p_matching_ids in varchar2
,p_return_pipe in varchar2
,p_errorcode in varchar2
)return number
is
// implementation start here....

My Java Program

public class Test {

public static void main(String[] args) {
CallableStatement csmt = null;
Connection con = null;
csmt = null;
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
System.out.println("oracle.jdbc.driver.OracleDrive r was loaded
successfully");
con = DriverManager.getConnection("jdbcracleci8:@ORA WTCP","zzndn07","atlantis");
System.out.println(con.toString());
csmt =con.prepareCall( " { call ? := BU00153P.search_pipe_out ( ?,
?, ? ) }");
csmt.registerOutParameter(1, Types.NUMERIC);
csmt.setString(2,"24598520,47162288,47162289");
csmt.setString(3, "BIP1PIPE$00400F450001");
csmt.setString(4,"0");
System.out.println(csmt.toString());
csmt.execute();
System.out.println("Done.");
csmt.close();
con.close();
}catch(Exception e) {e.printStackTrace();}
}
}



I get these error at the execute statement.


java.sql.SQLException: ORA-01036: illegal variable name/number

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:134)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAcce ss.java:2321)
at oracle.jdbc.oci8.OCIDBAccess.executeFetch(OCIDBAcc ess.java:1679)
at oracle.jdbc.oci8.OCIDBAccess.parseExecuteFetch(OCI DBAccess.java:1902)
at oracle.jdbc.driver.OracleStatement.executeNonQuery (OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther( OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:2709)
at oracle.jdbc.driver.OraclePreparedStatement.execute Update(OraclePreparedStatement.java:589)
at oracle.jdbc.driver.OraclePreparedStatement.execute (OraclePreparedStatement.java:656)
at Test.main(Test.java:33)


Any help is much appreciated.
Thanks in advance.

-Avi

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.