Exemple #1
0
 public override bool Read()
 {
     // Return true if it is possible to advance and if you are still positioned
     // on a valid row.
     if (++_Position >= CurrentResultSet.ResultCount())
     {
         // if the result set supports paging and has more records, load the next page.
         if (!CurrentResultSet.HasMoreRecords())
         {
             return(false);
         }
         else
         {
             CurrentResultSet.LoadNextPage();
             _Position = StartPosition;
             return(true);
             //TODO: Look into loading this asynchornously and ahead of time - perhaps 100 rows in advance?
             // Could grab the next page of results..
         }
     }
     else
     {
         return(true);
     }
 }
Exemple #2
0
 public override string GetName(int i)
 {
     return(CurrentResultSet.GetFieldNames()[i]);
 }
Exemple #3
0
 public override bool Read()
 {
     return(CurrentResultSet.Read());
 }
 public bool Read()
 {
     return(CurrentResultSet.Read());
 }
Exemple #5
0
 /// <summary>
 /// Gets the database type information for the specified field.
 /// </summary>
 /// <param name="fieldIndex">The index of the field to find.</param>
 /// <returns>The database type information for the specified field.</returns>
 public string GetDataTypeName(int fieldIndex)
 {
     return(CurrentResultSet.GetDataTypeName(fieldIndex));
 }
Exemple #6
0
 /// <summary>
 /// Returns the column ordinal, given the name of the column.
 /// </summary>
 /// <param name="colName">The name of the column. </param>
 /// <returns>The value of the column.</returns>
 public int GetOrdinal(string colName)
 {
     return(CurrentResultSet.GetOrdinal(colName));
 }
Exemple #7
0
 /// <summary>
 /// Gets all the attribute fields in the collection for the current record.
 /// </summary>
 /// <param name="values"></param>
 /// <returns></returns>
 public int GetValues(object[] values)
 {
     return(CurrentResultSet.GetValues(_currentRowIndex, values));
 }
Exemple #8
0
 /// <summary>
 /// Gets the Type information corresponding to the type of Object that would be returned from GetValue.
 /// </summary>
 /// <param name="fieldIndex">The zero-based column ordinal. </param>
 /// <returns>The value of the column.</returns>
 public Type GetFieldType(int fieldIndex)
 {
     return(CurrentResultSet.GetFieldType(fieldIndex));
 }
Exemple #9
0
 /// <summary>
 /// Return the value of the specified field.
 /// </summary>
 /// <param name="fieldIndex">The index of the field to find. </param>
 /// <returns>The object which will contain the field value upon return.</returns>
 public object GetValue(int fieldIndex)
 {
     return(CurrentResultSet.GetValue(_currentRowIndex, fieldIndex));
 }
Exemple #10
0
        public override object GetValue(int ordinal)
        {
            var value = CurrentResultSet.GetValue(ordinal, _Position);

            return(value);
        }