When doing your inserts, count the number of rows and throw an exception if 10.
If you are using Stored Procs, this is very easy and can all be done with one call to the DB. If you are using inline SQL, you will need to make multiple calls to the DB.
|