• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to execute a create oracle Procedure script using JDBC

 
PrashantK Jain
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
[ February 13, 2004: Message edited by: PrashantK Jain ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic