Ejemplo n.º 1
0
        private void button2_Click(object sender, System.EventArgs e)
        {
            string mdx = @"
select
    { [Measures].[Units Shipped], [Measures].[Units Ordered] } on columns,
    NON EMPTY [Store].[Store Name].members on rows
from Warehouse
";

            // old cellset
            FI.DataAccess.Serviced.XmlCellsetWrapper obj = new FI.DataAccess.Serviced.XmlCellsetWrapper();
            MessageBox.Show(obj.BuildCellset("GER-INSPIRON", "Foodmart 2000", mdx));

//			// new cellset
//			FI.DataAccess.Serviced.XmlCellsetWrapper2 obj2=new FI.DataAccess.Serviced.XmlCellsetWrapper2();
//			MessageBox.Show(obj2.BuildCellset("GER-INSPIRON", "Foodmart 2000", mdx));
        }
Ejemplo n.º 2
0
        private void InitializeProcess()
        {
            if (_process != null && !_process.HasExited)
            {
                return;
            }

            // process will host remote XmlCellsetWrapper
            // it will also activate tcp channel
            System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo(FI.Common.AppConfig.DA_OlapProcessorPath);
            si.Arguments           = @"port=" + this.TcpPort.ToString();
            si.CreateNoWindow      = true;
            si.UseShellExecute     = false;
            _process               = System.Diagnostics.Process.Start(si);
            _process.PriorityClass = System.Diagnostics.ProcessPriorityClass.BelowNormal;

            _xmlCst = (FI.DataAccess.Serviced.XmlCellsetWrapper)System.Activator.GetObject(typeof(FI.DataAccess.Serviced.XmlCellsetWrapper), XmlCellsetUrl);

            // attempts to ping remote objects
            for (int i = 0; i < 10; i++)
            {
                try
                {
                    System.Threading.Thread.Sleep(1000);
                    _xmlCst.Ping();

                    // if ping successful, break
                    break;
                }
                catch (Exception exc)
                {
                    // if last iteration, throw exception
                    if (i == 9)
                    {
                        Exception newExc = new Exception("Unable to initialize remoting host process: " + exc.Message);
                        FI.Common.LogWriter.Instance.WriteEventLogEntry(newExc);
                        throw exc;
                    }
                }
            }

            _state = StateEnum.Idle;
        }
Ejemplo n.º 3
0
        private void InitializeProcess()
        {
            if (_process != null && !_process.HasExited)
                return;

            // process will host remote XmlCellsetWrapper
            // it will also activate tcp channel
            System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo(FI.Common.AppConfig.DA_OlapProcessorPath);
            si.Arguments = @"port=" + this.TcpPort.ToString();
            si.CreateNoWindow = true;
            si.UseShellExecute = false;
            _process = System.Diagnostics.Process.Start(si);
            _process.PriorityClass = System.Diagnostics.ProcessPriorityClass.BelowNormal;

            _xmlCst = (FI.DataAccess.Serviced.XmlCellsetWrapper)System.Activator.GetObject(typeof(FI.DataAccess.Serviced.XmlCellsetWrapper), XmlCellsetUrl);

            // attempts to ping remote objects
            for (int i = 0; i < 10; i++)
            {
                try
                {
                    System.Threading.Thread.Sleep(1000);
                    _xmlCst.Ping();

                    // if ping successful, break
                    break;
                }
                catch (Exception exc)
                {
                    // if last iteration, throw exception
                    if (i == 9)
                    {
                        Exception newExc = new Exception("Unable to initialize remoting host process: " + exc.Message);
                        FI.Common.LogWriter.Instance.WriteEventLogEntry(newExc);
                        throw exc;
                    }
                }
            }

            _state = StateEnum.Idle;
        }