What is your database platform? There are certain ways that make this completely automatically and less prone to problems if you have a db platform that supports it (MS Access, MS-SQL Server).
Here is one way you could do this:
INSERT INTO myTable(autoIDColumn,...) VALUES(
(SELECT MAX(autoIDColumn)+1 FROM myTable)
, ...)
Peter
------------------------------------------------------
Work smarter, not harder.
|