Пример #1
0
 //Procedure to close connection with reader. This is for safe practice only.
 private void DisconnectReader()
 {
     try
     {
         //If reader instace is set then only close connection
         if (mReader != null)
         {
             //if reader is connected then only we can disconnect
             if (mReader.IsConnected == true)
             {
                 mReader.Close();
                 mReader.Dispose();
             }
         }
     }
     catch (Exception ex)
     {
         string inner = "";
         if (ex.InnerException != null)
         {
             inner = ex.InnerException.Message;
         }
         this.objUtil.LogError("Camiones", "DisconnectReader", ex.Message, inner, CGlobal.IdUsuario);
     }
 }