start is a SQL plus command so it cant work in java.
u can read the sql file and make each sql a seperate string and run it.

bye




                    "Jai Ganesh,
                    Balasubramaniam"                 To:     [EMAIL PROTECTED]
                    <balasubramaniam.jaiganes        cc:
                    [EMAIL PROTECTED]>                       Subject:
                    Sent by: A mailing list
                    for Enterprise JavaBeans
                    development
                    <[EMAIL PROTECTED]
                    M>


                    01/05/01 05:21 AM
                    Please respond to A
                    mailing list for
                    Enterprise JavaBeans
                    development






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".




______________________________________________________________________
Thames Water Plc., Registered Office 14 Cavendish Place, London W1M ONU.
Registered No. 2366623
This e-mail is confidential and intended solely for the use of the
individual to whom it is
addressed.  Any views or opinions presented are solely those of the author
and do not
necessarily represent those ofThames Water or its subsidiaries.
If you have received this e-mail message in error, please phone our
Computer Service Desk
on +44 (0)118 959 3587.  Please also destroy and delete the message from
your computer.

For more information on Thames Water visit our web site at
www.thames-water.com

===========================================================================
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".

Reply via email to