CA.Blocks.DataAccess.DataHelper

Class DataHelper Class

Namespace :CA.Blocks.DataAccess

Assembly : CA.Blocks.DataAccess.dll

This class is a helper class for dealing data values. It is intended to be a static helper class only.

Inheritance :




Method Methods

NameDescription
Static GetValueFromRowAsDateTime(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsDateTime(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsNullTimeSpan(System.Data.DataRow, System.String)
Static GetValueFromRowAsNullTimeSpan(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullTimeSpan(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsTimeSpan(System.Data.DataRow, System.String)
Static GetValueFromRowAsTimeSpan(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsTimeSpan(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsGuid(System.Data.DataRow, System.String)

Will get the data value from the row as a Guid. If the value is null an will be thrown This procedure assumes that the data is a Guid, if not a cast exception will be thrown.

Static GetValueFromRowAsGuid(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsGuid(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsNullGuid(System.Data.DataRow, System.String)

Will get the data value from the row as a nullable Guid. The return value will be set to either null or the Guid value This procedure assumes that the data is a Guid, if not a cast exception will be thrown.

Static GetValueFromRowAsNullGuid(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullGuid(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsChar(System.Data.DataRow, System.String)
Static GetValueFromRowAsChar(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsChar(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsNullChar(System.Data.DataRow, System.String)
Static GetValueFromRowAsNullChar(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullChar(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsRowVersion(System.Data.DataRow, System.String)
Static GetValueFromRowAsRowVersion(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsRowVersion(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsBinary(System.Data.DataRow, System.String)
Static GetValueFromRowAsBinary(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsBinary(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRow(System.Data.DataRow, System.String)

Will get the data value from the row as an object retuning the .NET null value in the event the data value is null in the DataRow.

Static GetValueFromRow(System.Data.DataRow, System.Data.DataColumn)

Will get the data value from the row as an object retuning the .NET null value in the event the data value is null in the DataRow.

Static GetValueFromRow(System.Data.DataRow, System.Int32)

Will get the data value from the row as an object retuning the .NET null value in the event the data value is null in the DataRow.

Static GetValueFromRowAsString(System.Data.DataRow, System.String, System.Boolean)

Will get the data value from the row as a string. The return value will be set to either null or and empty string depending on the value of ReturnNullAsEmptyString

Static GetValueFromRowAsString(System.Data.DataRow, System.Int32, System.Boolean)

Will get the data value from the row as a string. The return value will be set to either null or and empty string depending on the value of ReturnNullAsEmptyString

Static GetValueFromRowAsString(System.Data.DataRow, System.Data.DataColumn, System.Boolean)
Static GetValueFromRowAsNullInt(System.Data.DataRow, System.String)

Will get the data value from the row as a nullable int. The return value will be set to either null or the int value This procedure assumes that the data is an integer, if not a cast exception will be thrown.

Static GetValueFromRowAsNullInt(System.Data.DataRow, System.Data.DataColumn)

Will get the data value from the row as a nullable int. The return value will be set to either null or the int value This procedure assumes that the data is an integer, if not a cast exception will be thrown.

Static GetValueFromRowAsNullInt(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullUInt(System.Data.DataRow, System.String)
Static GetValueFromRowAsNullUInt(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsNullUInt(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsInt(System.Data.DataRow, System.String)

Will get the data value from the row as an int. If the value is null an will be thrown This procedure assumes that the data is an integer, if not a cast exception will be thrown.

Static GetValueFromRowAsInt(System.Data.DataRow, System.Data.DataColumn)

Will get the data value from the row as an int. If the value is null an will be thrown This procedure assumes that the data is an integer, if not a cast exception will be thrown.

Static GetValueFromRowAsInt(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsUInt(System.Data.DataRow, System.String)
Static GetValueFromRowAsUInt(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsUInt(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullDecimal(System.Data.DataRow, System.String)

Will get the data value from the row as a nullable Decimal. The return value will be set to either null or the Decimal value This procedure assumes that the data is an Decimaleger, if not a cast exception will be thrown.

Static GetValueFromRowAsNullDecimal(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullDecimal(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsDecimal(System.Data.DataRow, System.String)

Will get the data value from the row as an Decimal. If the value is null an will be thrown This procedure assumes that the data is an Decimaleger, if not a cast exception will be thrown.

Static GetValueFromRowAsDecimal(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsDecimal(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsNullDouble(System.Data.DataRow, System.String)

Will get the data value from the row as a nullable Double. The return value will be set to either null or the Double value This procedure assumes that the data is an Double, if not a cast exception will be thrown.

Static GetValueFromRowAsNullDouble(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullDouble(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsDouble(System.Data.DataRow, System.String)

Will get the data value from the row as an Double. If the value is null an will be thrown This procedure assumes that the data is an Double, if not a cast exception will be thrown.

Static GetValueFromRowAsDouble(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsDouble(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsNullFloat(System.Data.DataRow, System.String)
Static GetValueFromRowAsNullFloat(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullFloat(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsFloat(System.Data.DataRow, System.String)
Static GetValueFromRowAsFloat(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsFloat(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsNullLong(System.Data.DataRow, System.String)

Will get the data value from the row as a nullable long. The return value will be set to either null or the long value This procedure assumes that the data is an long, if not a cast exception will be thrown.

Static GetValueFromRowAsNullLong(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullLong(System.Data.DataRow, System.Data.DataColumn)

Will get the data value from the row as a nullable long. The return value will be set to either null or the long value This procedure assumes that the data is an long, if not a cast exception will be thrown.

Static GetValueFromRowAsLong(System.Data.DataRow, System.String)

Will get the data value from the row as an long. If the value is null an will be thrown This procedure assumes that the data is an long, if not a cast exception will be thrown.

Static GetValueFromRowAsLong(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsLong(System.Data.DataRow, System.Data.DataColumn)

Will get the data value from the row as an long. If the value is null an will be thrown This procedure assumes that the data is an long, if not a cast exception will be thrown.

Static GetValueFromRowAsNullULong(System.Data.DataRow, System.String)
Static GetValueFromRowAsNullULong(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullULong(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsULong(System.Data.DataRow, System.String)
Static GetValueFromRowAsULong(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsULong(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsBool(System.Data.DataRow, System.String)

Will get a the data value from the data row as a bool. If a DB Null is found then throw a NullException

Static GetValueFromRowAsBool(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsBool(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsBool(System.Data.DataRow, System.String, System.Boolean)

Will get a the data value from the data row as a bool. If a DB Null is found then it will return the default bool value defined in DefaultReturnValueIfNull

Static GetValueFromRowAsNullBool(System.Data.DataRow, System.String)
Static GetValueFromRowAsNullBool(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullBool(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsNullShort(System.Data.DataRow, System.String)

Will get the data value from the row as a nullable short. The return value will be set to either null or the short value This procedure assumes that the data is a short, if not a cast exception will be thrown.

Static GetValueFromRowAsNullShort(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullShort(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsUShort(System.Data.DataRow, System.String)
Static GetValueFromRowAsUShort(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsUShort(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsNullUShort(System.Data.DataRow, System.String)
Static GetValueFromRowAsNullUShort(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullUShort(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsShort(System.Data.DataRow, System.String)

Will get the data value from the row as an short. If the value is null an will be thrown This procedure assumes that the data is an short, if not a cast exception will be thrown.

Static GetValueFromRowAsShort(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsShort(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsNullSbyte(System.Data.DataRow, System.String)

Will get the data value from the row as a nullable sbyte. The return value will be set to either null or the sbyte value This procedure assumes that the data is a sbyte, if not a cast exception will be thrown.

Static GetValueFromRowAsNullSbyte(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullSbyte(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsSbyte(System.Data.DataRow, System.String)

Will get the data value from the row as an sbyte. If the value is null an will be thrown This procedure assumes that the data is an sbyte, if not a cast exception will be thrown.

Static GetValueFromRowAsSbyte(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsSbyte(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsNullByte(System.Data.DataRow, System.String)

Will get the data value from the row as a nullable short. The return value will be set to either null or the short value This procedure assumes that the data is a short, if not a cast exception will be thrown.

Static GetValueFromRowAsNullByte(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullByte(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsByte(System.Data.DataRow, System.String)

Will get the data value from the row as an byte. If the value is null an will be thrown This procedure assumes that the data is an byte, if not a cast exception will be thrown.

Static GetValueFromRowAsByte(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsByte(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsNullDateTime(System.Data.DataRow, System.String)

Will get the data value from the row as a nullable short. The return value will be set to either null or the short value This procedure assumes that the data is a short, if not a cast exception will be thrown.

Static GetValueFromRowAsNullDateTime(System.Data.DataRow, System.Int32)
Static GetValueFromRowAsNullDateTime(System.Data.DataRow, System.Data.DataColumn)
Static GetValueFromRowAsDateTime(System.Data.DataRow, System.String)

Will get the data value from the row as an DateTime. If the value is null an will be thrown This procedure assumes that the data is an DateTime, if not a cast exception will be thrown.