a- if these numbers are just metadata, then fine. if you're looking at this non-unique invoice number as some sort of record identifier, i'd strongly suggest against that and just making it metadata.
b- i would do this: use a helper table with the columns "year" and "serial" have a db function get_new_serial( year ) that does this: lock table read last_used_number( year ) increment last_used_number( year ) unlock table i would do EVERYTHING in a transaction. i dont recall if sqlite supports transactions and locking though. but that way, rose can just call the db function to get_new_serial (year) and you have a really portable interface. // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | FindMeOn.com - The cure for Multiple Web Personality Disorder | Web Identity Management and 3D Social Networking | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | RoadSound.com - Tools For Bands, Stuff For Fans | Collaborative Online Management And Syndication Tools | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object