예제 #1
0
        private Boolean runQuery()
        {
            if (_commandtext == null)
            {
                return(false);
            }

            validConnection();
            getCursor();

            if (Parameters.Count == 0)
            {
                if ((_prepared) ? _sqlrcur.executeQuery() : _sqlrcur.sendQuery(_commandtext))
                {
                    return(true);
                }
            }
            else
            {
                if (!_prepared)
                {
                    Prepare();
                }

                bindParameters();

                if (_sqlrcur.executeQuery())
                {
                    copyOutBindValues();
                    return(true);
                }
            }

            throw new SQLRelayException(_sqlrcur.errorNumber(), _sqlrcur.errorMessage());
        }