Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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;
        }