Added 1 gig of ram to my 12"PowerBook. The performance is sooo much better. I can now run Tomcat, Eclipse, Firefox, and Terminal without swapping disk when switching between them. I had been seeing the spinning beach ball when switching between Firefox and most apps during my normal usage. I think it was worth the upgrade.
Tuesday, February 22, 2005
Saturday, February 05, 2005
More MySQl2Derby notes:
fails for Derby. You must use
instead.
There is no LAST_INSERT_ID() function, so in Derby you might try adding a new select statement and then using the results in later statements.
and then set that value into a Java variable lastId to use in you INSERT statment.
Of course you want to turn autocommit off for executing multiple statement.
Column Names
ResultSet rs = stmt.execute("SELECT COUNT(id) FROM tableName;");
if( rs.next() ){
num = rs.getInt("COUNT(id)");
}
fails for Derby. You must use
rs.getInt(1);
instead.
Getting last autoincrement value
stmt.execute("INSERT INTO tableName VALUES (LAST_INSERT_ID(), 'foo')");
There is no LAST_INSERT_ID() function, so in Derby you might try adding a new select statement and then using the results in later statements.
SELECT MAX(id) FROM tableName
and then set that value into a Java variable lastId to use in you INSERT statment.
Of course you want to turn autocommit off for executing multiple statement.
Thursday, February 03, 2005
Finally started using Subversion for a personal project. I am really grateful to the developers. The have kept it very CVSish, but added features always missing from cvs. "svn move" when doing a Class name refactoring is great! Having multiple files commit together is similarly wonderful. The design of this, not starting from scratch interface wize, but liberally fixing obvious defects, is impressive. Great work Tigris. I didn't want to install a subversion server yet, so I signed up for a free account with CVSDude. The free account is a tiny 2 MB. I didn't check in external dependencies though and svn is performing nicely so far.
