Re: jdbc/mysql syntax error when using script from file



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



Relevant Pages

  • Re: Problem with boolean return parameter of CallableStatement.exe
    ... JDBC driver with Java 1.5.0 06. ... Some of our code uses the execute method of a CallableStatement to get a result set and checks that the boolean return parameteris true before then processing that result set. ... Using the sybase jdbc driver 'true' is returned when there are any results, whereas with the sqljdbc driver a 'false' is being returned. ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: jdbc/mysql syntax error when using script from file
    ... 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 ...
    (comp.lang.java.programmer)
  • Re: Some indexes not used in JDBC call
    ... the fact that SQL*plus and JDBC are not using the same version of TTC ... JDBC-Thin is pure Java and has to turn each release ... less than a second to execute in SQL*Plus. ... The query is identical, the ...
    (comp.lang.java.databases)
  • Re: NullPointerExceptions using CallableStatement
    ... I have come across the following problem using the SQLServer 2000 JDBC ... We are using a CallableStatement to execute the ... stored proc, however, unless we turn on implicit transactions within ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Some indexes not used in JDBC call
    ... I'm having a problem where a JDBC PreparedStatement without bind ... less than a second to execute in SQL*Plus. ... The query is identical, the ...
    (comp.lang.java.databases)