• 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

error while firing this SQL

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi !
I am generating the script for creating an oracle procedure in a java program. the generated script looks like
String buff="CREATE OR REPLACE PROCEDURE ALERTS_EX (ALERTS_cur OUT types.ref_cursor,BeginTimeStamp IN TimeStamp) AS
BEGIN
OPEN ALERTS_cur
FOR
SELECT * from ALERTS
END;"
thereafter i connect to database and create a statement etc as stmt=conn.createStatement();
then
int x=stmt.executeUpdate(buff);
However value of x comes as 0 and i am unable to create procedures in the database.
Can anyone please suggest where i am going wrong?
my email id is
prashantjainn@yahoo.com
Prashant
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure what this has to do with servlets, unless you are doing this in a servlet. Nevertheless, it is a JDBC question, so I am moving it there.
 
reply
    Bookmark Topic Watch Topic
  • New Topic