Hi All ,
I just make a connection class in App_code .But i didn't know what
i write in catch block for Error exception.Any body can tell me ??
i'll wait for reply.....
and one more thind what is differance between
catch and catch (Exception ex)....means in which condition we use it
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
public static void ExecuteNonQuery(string query)
{
SqlConnection Scon = new
SqlConnection(System.Configuration.ConfigurationManager.AppSettings["ConnectionString"]);
Scon.Open();
try
{
SqlCommand cmd = new SqlCommand();
cmd = Scon.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = query;
cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
}
finally
{
Scon.Close();
}
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>