When trying to insert into a in-memory table I get:

Exception in thread "main" java.sql.BatchUpdateException
        at org.h2.jdbc.JdbcStatement.executeBatch(JdbcStatement.java:644)
        at H2Setup.main(H2Setup.java:102)

Here the table create :

create memory table my_table (
ID VARCHAR(100) NOT NULL,
NAME    VARCHAR(400),
ADDRESS1 VARCHAR(400),
CITY    VARCHAR(200),
STABRV  VARCHAR(10),
ZIP5    VARCHAR(5),
PHONE   VARCHAR(19),
PRIMARY KEY (ID)
);


Connect string:

Connection connh =
DriverManager.getConnection("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1",
"sa", "");


insert is batched

for every 1000 records i do a :

int [] revtal =   pstmt.executeBatch();

else

pstmt.addBatch(Msql);


it works fine if i use jdbc:h2:~/test as my url.

Any ideas.

Thanks

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to