Пример #1
0
        public ClsQuery QueryReksa()
        {
            ClsQuery _cq = new ClsQuery();

            _cq.Server            = "tcp:reksa.database.windows.net,1433";
            _cq.Database          = "SQL_REKSA";
            _cq.UserName          = "******";
            _cq.Password          = "******";
            _cq.isErrorExtHandled = true;
            ClsQuery.queError.Clear();
            return(_cq);
        }
Пример #2
0
        public bool ExecCommand(string strCommand, out string ErrMsg)
        {
            ClsQuery clsQuery = QueryReksa();

            ErrMsg = "";
            bool result = true;

            try
            {
                result = clsQuery.ExecCommand(strCommand, out ErrMsg);
            }
            catch (Exception ex)
            {
                ErrMsg = ex.Message;
                result = false;
            }
            return(result);
        }
Пример #3
0
        public bool ExecProc(ClsQuery clsQuery, string strProc, ref List <SqlParameter> dbParam, out SqlCommand cmdOut, out string ErrMsg)
        {
            ErrMsg = "";
            bool result = true;

            cmdOut = new System.Data.SqlClient.SqlCommand();

            try
            {
                result = clsQuery.ExecProc(strProc, ref dbParam, out cmdOut, out ErrMsg);
            }
            catch (Exception ex)
            {
                ErrMsg = ex.Message;
                result = false;
            }

            return(result);
        }
Пример #4
0
        private bool ExecProc(ClsQuery clsQuery, string strProc, ref List <SqlParameter> dbParam, out DataSet dsResult, out SqlCommand cmdOut, out string ErrMsg)
        {
            dsResult = null;
            ErrMsg   = "";
            bool result = true;

            cmdOut = new SqlCommand();

            try
            {
                result = clsQuery.ExecProc(strProc, ref dbParam, out dsResult, out cmdOut, out ErrMsg);
            }
            catch (Exception ex)
            {
                ErrMsg = ex.Message;
                result = false;
            }

            return(result);
        }