public Boolean CreateConnection() { try { this.con = new SapConnection(); RfcDestinationManager.RegisterDestinationConfiguration(con); this.dest = RfcDestinationManager.GetDestination("NSP"); this.repo = dest.Repository; } catch (Exception ex) { try { // Break connection RfcDestinationManager.UnregisterDestinationConfiguration(con); } catch (Exception ex2) { } throw ex; } return(true); }
public Boolean CreateConnection() { try { this.con = new SapConnection(); RfcDestinationManager.RegisterDestinationConfiguration(con); this.dest = RfcDestinationManager.GetDestination("NSP"); this.repo = dest.Repository; } catch (Exception ex) { try { // Break connection RfcDestinationManager.UnregisterDestinationConfiguration(con); } catch (Exception ex2) { } throw ex; } return true; }