SqlColumnBinder Class
This class is a convienent way to efficiently access result columns. It caches column ordinals.
To use this class, create a static instance of it, pass in the column name to the constructor, and use the GetXXX methods at runtime to retrieve the values.
After the first GetXXX() call, the column number will be cached.
This object should be reused for any future calls against the same shape of result set.
Inheritance Hierarchy
System.Object
Microsoft.TeamFoundation.Framework.Server.SqlColumnBinder
Namespace: Microsoft.TeamFoundation.Framework.Server
Assembly: Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)
Syntax
'Declaration
Public Class SqlColumnBinder
public class SqlColumnBinder
public ref class SqlColumnBinder
type SqlColumnBinder = class end
public class SqlColumnBinder
The SqlColumnBinder type exposes the following members.
Constructors
Name | Description | |
---|---|---|
SqlColumnBinder | Creates a SqlColumnReader to read the named column |
Top
Properties
Name | Description | |
---|---|---|
ColumnName | Name of the column this binder binds too. |
Top
Methods
Name | Description | |
---|---|---|
ColumnExists | Checks if column is in the result set. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetBoolean(DbDataReader) | Retrieves the value of this column as a bool from the given reader. An exception will be thrown if the column is null | |
GetBoolean(DbDataReader, Boolean) | Retrieves the value of this column as a bool from the given reader. An exception will be thrown if the column is null | |
GetBoolean(DbDataReader, Boolean, Boolean%) | Retrieves the value of this column as a bool from the given reader. Sets the output parameter to true if the value was null. | |
GetByte(DbDataReader) | Retrieves the value of this column as an int from the given reader. An exception will be thrown if the column is null | |
GetByte(DbDataReader, Byte) | Retrieves the value of this column as an int from the given reader. An exception will be thrown if the column is null | |
GetByte(DbDataReader, Byte, Byte) | Retrieves the value of this column as an int from the given reader. An exception will be thrown if the column is null | |
GetBytes(DbDataReader, Boolean) | ||
GetBytes(DbDataReader, Int64, array<Byte[], Int32, Int32) | Read a chunk of bytes from a column. When used with ExecuteReader(CommandBehavior.SequentialAccess), you can efficiently stream bytes from a BLOB column. | |
GetDateTime(DbDataReader) | ||
GetDateTime(DbDataReader, DateTime) | ||
GetDateTimeOffset | ||
GetDouble(DbDataReader) | Retrieves the value of this column as a double from the given reader. An exception will be thrown if the column is null. | |
GetDouble(DbDataReader, Double) | Retrieves the value of this column as a double from the given reader | |
GetFloat(DbDataReader) | Retrieves the value of this column as float from the given reader. An exception will be thrown if the column is null | |
GetFloat(DbDataReader, Single) | Retrieves the value of this column as float from the given reader. | |
GetFloat(DbDataReader, Single, Single) | Retrieves the value of this column as float from the given reader. | |
GetGuid(DbDataReader) | ||
GetGuid(DbDataReader, Boolean) | Retrieves the value of this column as a Guid from the given reader. If allowNulls is true, null values will be returned as empty GUIDs. Otherwise, a SQLException will be thrown if a null is encountered | |
GetGuid(DbDataReader, Boolean, Guid) | Retrieves the value of this column as a Guid from the given reader. If allowNulls is true, null values will be returned as empty GUIDs. Otherwise, a SQLException will be thrown if a null is encountered | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetInt16(DbDataReader) | Retrieves the value of this column as an Int16 from the given reader. An exception will be thrown if the column is null or not found in the result set. | |
GetInt16(DbDataReader, Int16) | Retrieves the value of this column as an Int16 from the given reader. An exception will be thrown if the is not found in the result set. | |
GetInt16(DbDataReader, Int16, Int16) | Retrieves the value of this column as an Int16 from the given reader. | |
GetInt32(DbDataReader) | Retrieves the value of this column as an int from the given reader. An exception will be thrown if the column is null | |
GetInt32(DbDataReader, Int32) | Retrieves the value of this column as an int from the given reader. | |
GetInt32(DbDataReader, Int32, Int32) | Retrieves the value of this column as an int from the given reader. | |
GetInt64(DbDataReader) | Retrieves the value of this column as an int from the given reader. An exception will be thrown if the column is null | |
GetInt64(DbDataReader, Int64) | Retrieves the value of this column as an int from the given reader. | |
GetInt64(DbDataReader, Int64, Int64) | Retrieves the value of this column as an int64 from the given reader. | |
GetObject | ||
GetOrdinal | ||
GetString(DbDataReader, Boolean) | Retrieves the value of this column as a string from the given reader. If allowNulls is true, null values will be returned as null strings. Otherwise, a SQLException will be thrown if a null is encountered | |
GetString(DbDataReader, String) | Retrieves the value of this column as a string from the given reader. null will be returned if DB column is NULL. | |
GetTimeSpan(SqlDataReader) | ||
GetTimeSpan(SqlDataReader, TimeSpan) | ||
GetTimeSpan(SqlDataReader, TimeSpan, TimeSpan) | ||
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsInitialized | Returns value whether or not a column has been resolved to its ordinal value. | |
IsNull | ||
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.