in reply to inserting new data into table

Your question is a bit vauge in that the answer you are looking for is dependant on how you are accessing the database (Perl DBI?) and what type of database you are accessing.

If your ID tag in your DB is set to autonumber you don't have to sweat incrementing the ID. If your using a flat-file db or berkley you'll need to specify that in your question, and I'm sure someone would have the most correct answer.

coreolyn