This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I've re-read your posts: you are not actually using a sequence are you? Be careful before you rush to answer that - "sequence" (in this context) is an Oracle/Postgres specific term, so if its not either you are using, then ignore my previous post. If however it is, the syntax for selecting the next value from a sequence is "select seq_name.nextval from dual"/"select nextval('sequence_name')" respecitively - not using the max() function. If you are using another RDBMS then you probably have an autonumber or serial datatype as Blake Minghelli points out. In which case, just leave the PK out of your insert statement and let the DB handle it. i.e.:
[ June 17, 2004: Message edited by: Paul Sturrock ]