SqlConnection con = new SqlConnection(cnstr);
SqlCommand cmd = new SqlCommand(sqlStmt, con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
try
{
cmd.Connection.Open();
rows = cmd.ExecuteNonQuery();
if (rows == -1)
{
Response.Write("No Rows returned from query");
Response.End();
}
Message + "\n" +
"LineNumber: " + ex.Errors[i].LineNumber + "\n" +
"Source: " + ex.Errors[i].Source + "\n" +
"Procedure: " + ex.Errors[i].Procedure + "\n");
}
Response.Write(errorMessages.ToString());
}