>On second thought, there is something wrong with this code. For each insert, there are now two records being inserted. This is like that since I added the SELECT SCOPE_IDENTITY() in the SQL with the ExecuteScalar().
It seems the ExecuteScalar() with the SQLClient provider does not need any ExecuteNonQuery(). That was causing the command to be executed twice. I had it in there to support for OleDb mode. So, I put a condition to avoid executing that ExecuteNonQuery() line for the SQLClient provider.