• Here is a link to SQL Server Data Type Mappings documentation that I found helpful in understanding how SQL data types map to .NET data types and what SQL DataReader typed accessor (e.g., GetString and GeBoolean) is needed to read a particular SQL data type from within .NET.

  • A good link on how the retrieve the Microsoft SQL rowversion/timestamp value from the standard IDataReader interface.  Below is how I implemented.

    byte[] rowVersionBuffer = new byte[8];
    dataReader.GetBytes(rowVersionField_OrdinalValue, 0, rowVersionBuffer, 8);  // rowversion storage size is 8 bytes.  timestamp is a synonym for rowversion.
    businessObject.RowVersion = rowVersionBuffer;

    // business object rowversion/timestamp property

    private byte[] _RowVersion
    public byte[] RowVersion
       get { return _RowVersion;}
       set { _RowVersion = value; }

  • jsfiddle  A tool to test HTML, CSS, and JavaScript.