db.command.Parameters.Add("@ItemCode", SqlDbType.VarChar).Value = row.Cells["Category Code"].Value.ToString();
db.command.Parameters.Add("@ItemName", SqlDbType.VarChar).Value = row.Cells["Category"].Value.ToString();
Of course you are only getting the first row. You are never telling your loop to copy different rows. Its just copying the same row every time.