Problem: commit doesn´t work
От | Marcos de Barros |
---|---|
Тема | Problem: commit doesn´t work |
Дата | |
Msg-id | 00d701c2b68d$341f36a0$2b00a8c0@infoclass обсуждение исходный текст |
Ответы |
Re: Problem: commit doesn´t work
Re: Problem: commit doesn´t work |
Список | pgsql-jdbc |
Hi Group,
I´m a new membrer and have a problem with the commit in jdbc postgres. I would appreciate some help.
I have a program that execute 40000 inserts in a table. I set autocommit = false before the process and begin the loop. The 39999 insert, for example, has an error and after the loop i execute the commit command. The SQL Server or Oracle driver commit all the 39998 right inserts. The postgres doesn´t commit one. I figure it´s a bug, or i´m doing something wrong. Above is the code:
for (int i=0; i < queryList.length; i++) {
if (queryList[i] != null) {
try {
statement.execute(queryList[i]);
}
catch(Exception e) {
System.out.println("queryList[" + i + "]" + queryList[i]);
}
}
if (queryList[i] != null) {
try {
statement.execute(queryList[i]);
}
catch(Exception e) {
System.out.println("queryList[" + i + "]" + queryList[i]);
}
}
}
connection.commit();
Thank you a lot!
Best Regards,
Marcos de Barros
Iclass Consultoria
mbarros@iclass.com.br
http://www.iclass.com.br
Tels: (21) 2240-8747 / (21) 2220-1480
Iclass Consultoria
mbarros@iclass.com.br
http://www.iclass.com.br
Tels: (21) 2240-8747 / (21) 2220-1480
В списке pgsql-jdbc по дате отправления: