Jaiganesh,
If you can pass command line arguments to sqlplus to execute a .sql file
(this works with MSSQL's isql/osql), then a quick and dirty solution would
be to just execute sqlplus from your Java application. Look at the JDK docs
for the Runtime class.
Example:
// execute NotePad
Runtime rt = Runtime.getRuntime();
try
{
rt.exec("notepad.exe");
}
catch(Exception e)
{
// ignored
}
Regards,
Daniel Mork
[EMAIL PROTECTED]
-----Original Message-----
From: Jai Ganesh, Balasubramaniam
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 04, 2001 9:22 PM
To: [EMAIL PROTECTED]
Subject:
Importance: High
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".