Example #1
0
        /// <summary>
        /// Establishes a connection to the server.
        /// </summary>
        /// <param name="userName">The user name used to connect.</param>
        /// <param name="password">The password used to connect.</param>
        public void Connect(string userName, string password)
        {
            _serverHandle = NativeOlapApi.ServerConnect(_store.ClientSlot, _name, userName, password, _lastError);

            if (_serverHandle == 0)
            {
                throw new OlapException("Server connect failed!", _lastError.Value);
            }
        }
Example #2
0
        /// <summary>
        /// Establishes a connection to the server using a COS ticket.
        /// </summary>
        /// <param name="ticket">The COS ticket to use.</param>
        public void ConnectTicket(string ticket)
        {
            _serverHandle = NativeOlapApi.ServerConnect(_store.ClientSlot, _name, ticket, _lastError);

            if (_serverHandle == 0)
            {
                throw new OlapException("Server connect failed!", _lastError.Value);
            }
        }