try catch finally
- by gligom
Maby this is simple for you, but for me is not.
I have this code:
Private int InsertData()
{
int rezultat = 0;
try
{
if (sqlconn.State != ConnectionState.Open)
{
sqlconn.Open();
}
rezultat = (int)cmd.ExecuteScalar();
}
catch (Exception ex)
{
…