OK, well I'm still implementing my type library, and my approach is 'it goes in if I need it'. So, I was thinking, is there any usage scenario where I'll need to compare a Binary value (basically a nullable byte) for say GreaterThan(..), etc. The answer is no. Regardless, I was wondering how the spec determined if some 'binary' data was greater than some other 'binary' data. This is unlikely to have any meaning, let alone any use, but I guess somewhere, someone finds this useful. I guess I'll expand on Binary and include an Image type too, but I haven't thought too hard about this yet.
My gripe is about what I saw in the spec. Check out this from the MSDN doco on SqlBinary.GreaterThan method:
A SqlBoolean that is True if the first instance is greater than the second instance, otherwise False. If either instance of SqlBinary is null, the Value of the SqlBoolean will be Null.
So, apparently “the Value of the SqlBoolean will be Null”. Really? How is it that I am to represent a Null value in a System.Boolean type?
Do anybody solve problem with nullable timestamp (binary). I want to check if a record was modified in DB.
Yeah, I think I wrote a nullable timestamp struct at one point..
I don't think it's going to help you though. If you want to check if a record has been modified in the database, just check the known timestamp against the current timestamp while you own a transaction..
Nullable timestamps won't help you there. If the 'timestamp' is 'null' then the row mustn't exist yet. Otherwise, you should already have it..