• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trying to call an Oracle strored procedure

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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("jdbc:oracle:thin:@duncan:1521:Dcndev1", 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic