I have a time stamp on a SQL server table, which is set to a value of 0x00000000117A33F9. I am unable to extract this using the SafeDataReader, as it always gets returned as an empty byte array.
I have tried using GetBytes and GetValue and converting to a byte array, but can't seem to make the value change, based on the return result of the stored procedure.
How am I meant to do this in C#?
Did you add the dimension of your byte array? If not then it will be empty. The correct syntax should be:
protected
byte[] _timestamp = new byte[ 8 ]; //in your Business Methods regiondr.GetBytes("TimeStamp", 0, _timestamp, 0, 8); //in your Dataportal methods
Where _timestamp is your class member.
Sounds odd... Try running the PTracker example and inspect if that behaviour is also occuring. I would be surprised but give it a go nevertheless and let us know the result...
Copyright (c) Marimer LLC