You do a commit after like
int n = psInsert.executeUpdate();
con.commit();
???
(I've not seen this piece of code there...)
Richter
yves pielusenet escreveu:
Here is how I connect to the database :
String url = "jdbc:derby:"+purl+pdbname+";create="+cancreatedb;
String driver = "org.apache.derby.jdbc.EmbeddedDriver";
Class.forName(driver);
con = DriverManager.getConnection(url, user, passwd);
con.setAutoCommit(false);
And here is how I execute sql statements :
// I create the prepared statement only once :
psInsert = dbgencon.getConnection().prepareStatement("INSERT INTO data
(numvign, data) VALUES (?, ?)");
...
// I configure the statement and execute it
psInsert.setInt(1, numvign);
psInsert.setBytes(2, DBGenConnection.obj2Bytes(jv));
int n = psInsert.executeUpdate();
When I comment the last line I haven't got the
java.lang.OutOfMemoryError
Maybe it important to say that I use 2 derby connexion into the same
application. And I do lots of insert into the two one.
thanks for any help :)
begin:vcard
fn:Edson Carlos Ericksson Richter
n:Richter;Edson
org;quoted-printable:MGR Inform=C3=A1tica Ltda;Desenvolvimento
adr:Cristo Redentor;;Assis Brasil, 3257, Sala 409;Porto Alegre;RS;91010007;Brasil
email;internet:[EMAIL PROTECTED]
title:Diretor de Sistemas
tel;work:(51)3347-0446
tel;cell:(51)9259-2993
x-mozilla-html:FALSE
url:http://www.mgrinformatica.com.br
version:2.1
end:vcard