Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
    Bookmark Topic Watch Topic
  • New Topic

Problem while firing this SQL  RSS feed

 
PrashantK Jain
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65891
135
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Prashant, please do not post the same question to multiple forums -- epecially inappropriate ones. It just wastes peoples' time when redundant conversation take place. Please contimue any discussion in the JDBC forum.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!