示例#1
0
        public SQLCECursor ExecuteResultSet(string tableName, string indexName, DbRangeOptions rangeOptions, object[] startValues, object[] endValues, ResultSetOptions resultSetOptions)
        {
            Command.CommandType = System.Data.CommandType.TableDirect;
            Command.CommandText = tableName;
            Command.IndexName   = indexName;
            Command.SetRange(rangeOptions, startValues, endValues);
                        #if SQLSTORETIMING
            long startTicks = TimingUtility.CurrentTicks;
            try
            {
                        #endif

            return(new SQLCECursor(this, Command.ExecuteResultSet(resultSetOptions)));

                        #if SQLSTORETIMING
        }

        finally
        {
            Store.Counters.Add(new SQLStoreCounter("ExecuteResultSet", ATableName, AIndexName, AStartValues != null && AEndValues == null, AStartValues != null && AEndValues != null, (ResultSetOptions.Updatable & AResultSetOptions) != 0, TimingUtility.TimeSpanFromTicks(startTicks)));
        }
                        #endif
        }
示例#2
0
        internal SqlCeResultSet ExecuteResultSet(string ATableName, string AIndexName, DbRangeOptions ARangeOptions, object[] AStartValues, object[] AEndValues, ResultSetOptions AResultSetOptions)
        {
            ExecuteCommand.CommandType = CommandType.TableDirect;
            ExecuteCommand.CommandText = ATableName;
            ExecuteCommand.IndexName   = AIndexName;
            ExecuteCommand.SetRange(ARangeOptions, AStartValues, AEndValues);

                        #if SQLSTORETIMING
            long LStartTicks = TimingUtility.CurrentTicks;
            try
            {
                        #endif

            return(ExecuteCommand.ExecuteResultSet(AResultSetOptions));

                        #if SQLSTORETIMING
        }
        finally
        {
            Store.Counters.Add(new SQLStoreCounter("ExecuteResultSet", ATableName, AIndexName, AStartValues != null && AEndValues == null, AStartValues != null && AEndValues != null, (ResultSetOptions.Updatable & AResultSetOptions) != 0, TimingUtility.TimeSpanFromTicks(LStartTicks)));
        }
                        #endif
        }