示例#1
0
        public bool Read()
        {
            bool isRead = _this.DataReader.Read();

            if (isRead)
            {
                _chacheTable.Clear(_this.BatchSize);
                DataRow newRow = _chacheTable.CreateNewRow();
                for (int i = 0; i < _this.DataReader.FieldCount; i++)
                {
                    newRow[i] = _this.DataReader.GetValue(i);
                }
                _chacheTable.AddNewRow(newRow);
            }

            return(isRead);
        }
示例#2
0
        public bool Read()
        {
            bool isRead = _this.DataReader.Read();

            if (isRead)
            {
                _chacheTable.Clear(_this.BatchSize);
                DataRow       newRow = _chacheTable.CreateNewRow();
                StringBuilder sb     = new StringBuilder();
                for (int i = 0; i < _this.DataReader.FieldCount; i++)
                {
                    newRow[i] = _this.DataReader.GetValue(i);
                    sb.AppendLine(string.Format("{0} = \"{1}\"", _this.ColumnMappings[i].SourceColumn, newRow[i]));
                }
                _expression.Execute(sb.ToString());
                _chacheTable.AddNewRow(newRow);
            }

            return(isRead);
        }