maybe, I don't know ;-)

But it will only take a few (less than 10) lines of code to loop through the
file with a StringTokeniser and execute each statement.

Hey you could have written it in the time it takes to read this email!

Cheers

> -----Original Message-----
> From: Lakshmeenarayana G G [SMTP:[EMAIL PROTECTED]
> Sent: 01 April 2003 11:36
> To:   [EMAIL PROTECTED]
> Subject:      Re: Directly run SQL Script file using JDBC
>
> So its as good as reading the each command and executing it manually.
> But is there any method available in JDBC so that I just give my .sql file
> as input and it takes care of executing it provided I give information of
> the database where it should run.
>
> Any other third party package available for the same? May be in some org
> sites or so...
>
> Cheers..
> Lakshmeenarayana G G
> ArisGlobal India Development Center,
> SysArris Software Pvt. Ltd.,
> Bangalore, India
>
>
>
>
>
>
> -----Original Message-----
> From: Adrian Janssen [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 01, 2003 2:42 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Directly run SQL Script file using JDBC
>
>
> you could just read the file in normaly, look for end of statement
> indicators ("/"), and then run each command through a statement as per
> normal.
>
> > -----Original Message-----
> > From: Lakshmeenarayana G G [SMTP:[EMAIL PROTECTED]
> > Sent: 01 April 2003 11:23
> > To:   [EMAIL PROTECTED]
> > Subject:      Directly run SQL Script file using JDBC
> >
> > Hi All,
> >
> > Is there anyway I can run .sql script file ( which is present in my
> > application directory ) directly using JDBC API  on to Oracle Database
> > without manually running the sql file in SQL * Plus tool.
> >
> > Cheers.
> >
> > Lakshmeenarayana G G
> > ArisGlobal India Development Center,
> > SysArris Software Pvt. Ltd.,
> > Bangalore, India
> > Tel:  91-80-665 4965 / 664 2690 / 6655052
> > Fax: 91-80-655 4285 / 665 0374
> > <http://www.sysarris.com/>
> >
> >
> --
>
> It is the strict policy of Truworths that its e-mail facility and all
> e-mail communications emanating therefrom, should be utilised for
> business purposes only and should conform to high professional and
> business standards.   Truworths has stipulated certain regulations in
> terms whereof strict guidelines relating to the use and content of
> e-mail communications are laid down. The use of the Truworths e-mail
> facility is not permitted for the distribution of chain letters or
> offensive mail of any nature whatsoever.   Truworths hereby distances
> itself from and accepts no liability in respect of the unauthorised
> use of its e-mail facility or the sending of e-mail communications
> for other than strictly business purposes.   Truworths furthermore
> disclaims liability for any  unauthorised instruction for  which
> permission was not granted.    Truworths Limited accepts no liability
> for any consequences arising from or as a result of reliance on this
> message unless it is in respect of bona fide Truworths business for
> which proper authorisation has been granted.
>
> Any recipient of an unacceptable communication, a chain letter or
> offensive material of any nature is requested to notify the Truworths
> e-mail administrator ([EMAIL PROTECTED]) immediately in order that
> appropriate action can be taken against the individual concerned.
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
--

It is the strict policy of Truworths that its e-mail facility and all
e-mail communications emanating therefrom, should be utilised for
business purposes only and should conform to high professional and
business standards.   Truworths has stipulated certain regulations in
terms whereof strict guidelines relating to the use and content of
e-mail communications are laid down. The use of the Truworths e-mail
facility is not permitted for the distribution of chain letters or
offensive mail of any nature whatsoever.   Truworths hereby distances
itself from and accepts no liability in respect of the unauthorised
use of its e-mail facility or the sending of e-mail communications
for other than strictly business purposes.   Truworths furthermore
disclaims liability for any  unauthorised instruction for  which
permission was not granted.    Truworths Limited accepts no liability
for any consequences arising from or as a result of reliance on this
message unless it is in respect of bona fide Truworths business for
which proper authorisation has been granted.

Any recipient of an unacceptable communication, a chain letter or
offensive material of any nature is requested to notify the Truworths
e-mail administrator ([EMAIL PROTECTED]) immediately in order that
appropriate action can be taken against the individual concerned.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to