db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yves pielusenet <yvespieluse...@free.fr>
Subject Re: [MEMORY] Derby full fill my the JVM memory
Date Mon, 22 May 2006 17:23:12 GMT
Here is how I connect to the database :

String url = "jdbc:derby:"+purl+pdbname+";create="+cancreatedb;
String driver = "org.apache.derby.jdbc.EmbeddedDriver";

con = DriverManager.getConnection(url, user, passwd);

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

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

View raw message