Hi Jaiganesh,
As per as my knowelge we can do only following things with
statement/preparedStatement object
1) executeQuery for fething the resultset
2) executeUpdate for modifying the record or create or alter the schema
3) execute to pass the query dynamically, that time u don't know whether to
fetch/modify/create/alter
start is command of oracle SqlPlus if it supported by JDBC API, u can do
with executeUpdate/execute
otherwise u have to do separately or check whether executeBacth may be
helpful for u.
If u have any feed back, welcome
Edla B. Reddy
"Jai Ganesh, Balasubramaniam" <[EMAIL PROTECTED]> on
05/01/2001 10:51:57 AM
Please respond to A mailing list for Enterprise JavaBeans development
<[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: ebreddy/Cds)
Subject:
Hi
I have an SQL file named as job.sql.
To execute this file in SQL* Plus(Oracle Server) we use
SQL> Start job.sql (its works fine)
But i need to execute this file thru Java program (using JDBC)
I tried as below
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection(" ");
Statement stmt = con.createStatement();
stmt.executeQuery("start job.sql");
but it is not working.
can u pls help me out guys to run Start job.sql file thru java program.
Is there any command in java for executing .sql file directly.
Thanks & Regards
Jaiganesh
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".