When you Insert Dada through ExecuteNonQuery() Method .. This method Return No. of Query Affected in Database as integer datatype..
So please you it for reducing your problem.
For Example.
int i=0;
i= cmd.ExecuteNonQuery();
if( i >0)
{
msg ="Inserted Successfully";
}
else
msg="Not Inserted";
Thanks
AARIF SHAIKH