Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trying to call an Oracle strored procedure

 
Bill Thomason
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Class.forName("oracle.jdbc.driver.OracleDriver");
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Hi,
I am having problems calling a stored procedure. i want to call a stored procedure with no arguments. but i kept getting invalid arguments in call
so i recompiled my procedure to take a number argument. now here is a snippit of the code i'm using to make the call. still getting invalid arguments in call in my catch.

Bill

Connection conn = DriverManager.getConnection("jdbcracle:thin:@duncan:1521cndev1", username, password);

CallableStatement oraStmt1 = conn.prepareCall("call mur_proc.out_analytics(?);");

int i = 1;
oraStmt1.setInt(1, i);
oraStmt1.execute();
oraStmt1.close();
conn.close();

[edited to disable smilies]
[ December 09, 2004: Message edited by: Jeanne Boyarsky ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic