A .sql program depends upon SQL*PLUS to interpret/execute it. This is not
supported by JDBS, as it is entirely an Oracle proprietary JCL. You need to
recode the .sql into PL/SQL, which you can "call". This may not be possible
if you are relying on the special features of SQL*PLUS, such as boilerplate
manipualtion, formatting, grouping, etc., in other words if you are trying
to use SQL*PLUS to produce a report , you are out of luck.
> -----Original Message-----
> From: Jai Ganesh, Balasubramaniam
> [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 05, 2001 12:22 AM
> 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".