Re: jdbc/mysql syntax error when using script from file
- From: Lionel <lionelv_@xxxxxxxxx>
- Date: Tue, 17 Oct 2006 07:19:46 +1000
Manish Pandit wrote:
Hi,
With JDBC, you need to execute the statements one by one, not in batch.
You will need to read the file, split out individual statements and
then do executeUpdate in a loop. If every statement in the file has its
own line, you can use a buffered reader to read in the strings.
Thanks it appears you are right.
There is an executeBatch() method too, but AFAIK there is no guarantee
that the JDBC driver will implement it.
I'll look into it but I guess I want it to be certain that it will run for any dbms on any OS.
Thanks again
Lionel.
.
- Follow-Ups:
- Re: jdbc/mysql syntax error when using script from file
- From: Manish Pandit
- Re: jdbc/mysql syntax error when using script from file
- References:
- jdbc/mysql syntax error when using script from file
- From: lionelv
- Re: jdbc/mysql syntax error when using script from file
- From: Manish Pandit
- jdbc/mysql syntax error when using script from file
- Prev by Date: Re: What software process do you use for java development? (Agile, XP, BDUF, Scrum, RUP, Chaos)
- Next by Date: Re: What software process do you use for java development? (Agile, XP, BDUF, Scrum, RUP, Chaos)
- Previous by thread: Re: jdbc/mysql syntax error when using script from file
- Next by thread: Re: jdbc/mysql syntax error when using script from file
- Index(es):
Relevant Pages
|