aspose file tools*
The moose likes Object Relational Mapping and the fly likes Problem while firing this SQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply locked New topic
Author

Problem while firing this SQL

PrashantK Jain
Greenhorn

Joined: Feb 13, 2004
Posts: 3
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

Joined: Jan 10, 2002
Posts: 61426
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
wood burning stoves
 
subject: Problem while firing this SQL