in reply to DBI and primary keys
If you are using MSSQL, then this node should do it: Identity nabber for MSSQL, should work for Sybase as well.