This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 60810
    
  65

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem while firing this SQL
 
Similar Threads
create store procedure using shell script.
serveroutput
error while firing this SQL
How to execute a create oracle Procedure script using JDBC
Process err- not a valid Win32 application