Hello..
I tried using connection pool in my ram DB..
if i dont't use beginTransaction, it seems no problem.
But when i use beginTransaction using connection pool in my ram DB,
i got a problem that the transaction didn't work at all.

Here my code to get connection pool in ram:
JdbcConnectionPool cpool =
JdbcConnectionPool.create("jdbc:h2:mem:db_ram", "", "");

BEGIN TRANSACTION
try {
//       insert record to ramDB
         insert into Products(product_id, product_name) VALUES (1,
"SNACK");     --> table Products is exists
         insert into Products2(product_id, product_name) VALUES (2,
"POTATO");  --> table Products2 isn't exists

        COMMIT
} catch(Exception e) {
        ROLLBACK
}

NB : assume above code is correct

The Result is :
The Product Name "SNACK" is inserted to ram DB  --> (the rollback
didn't work at all)

Is beginTransaction not allowed in connection pool at memory
database??

satio

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