Re: [sqlite] Running multiple DDL statements in a batch (via JDBC)

2007-03-26 Thread Joe Wilson
AFAIK The behavior you're looking for is not well defined by the JDBC API: http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Statement.html http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Statement.html#addBatch(java.lang.String) Perhaps some JDBC drivers implement the behavior you expect,

Re: [sqlite] Running multiple DDL statements in a batch (via JDBC)

2007-03-26 Thread drh
"Steven E. Harris" <[EMAIL PROTECTED]> wrote: > > Does SQLite normally execute more than one statement provided in a SQL > string? The sqlite3_prepare()/sqlite3_step() API only executes a single statement. The sqlite3_prepare() routine returns a pointer to the next statement if you give it a

[sqlite] Running multiple DDL statements in a batch (via JDBC)

2007-03-26 Thread Steven E. Harris
I'm using the "pure" SQLite JDBC driverĀ¹ and trying to bootstrap my database schema by running a batch of DDL statements. I read in the entire DDL script from a file, collect it into a string, and feed that string into either java.sql.Statement.executeUpdate() or java.sql.Statement.executeBatch().