Rob

England, United Kingdom

robertwray.co.uk/blog

Age: 33

Developer working in the telecommunications industry in the UK

Aug
24
awarded Autobiographer
Aug
23
awarded Critic
Aug
23
awarded Supporter
Aug
23
awarded Autobiographer
Aug
12
reviewed Reject suggested edit on How to prevent anyone sees method statements code when pressing F12?
Aug
7
awarded Good Answer
Aug
7
comment What is the purpose of global.asax in asp.net
@CathySullivan, updated, thanks! :)
Aug
7
revised What is the purpose of global.asax in asp.net
Wikipedia -> MSDN
Aug
6
comment Custom aggregate function intermittently throws NullReferenceException
@TabAlleman, Theoretically value should never be null as it'll be an initialised instance of the aggregate that's being passed in. That said, it could be that value.latestDateTime.IsNull is true (remember, the latestDateTime member is a SqlDateTime which is sort of like DateTime? and that has a weird interaction with < but that would be surprising (I'm preparing to be surprised!). I'll add a few unit tests to see how that pans out later today.
Aug
6
comment Custom aggregate function intermittently throws NullReferenceException
@David, in a simple case the use of partition functions (we're on SQL Server 2008 R2/SP3 and alas upgrading isn't an option at present) returns both the correct results and satisfactory performance, however for more complex (i.e. production) queries, the performance tails off as compared to the CLR. In an ideal world, I'd not be using a CLR, but this isn't an ideal world :(
Aug
6
revised Custom aggregate function intermittently throws NullReferenceException
Added clarification
Aug
6
comment Custom aggregate function intermittently throws NullReferenceException
... every single one is worthy of being marked as a duplicate of "What is a NullReferenceException and how do I fix it?"
Aug
6
comment Custom aggregate function intermittently throws NullReferenceException
@PeterDuniho, did you actually read my question in its entirety before marking it as a duplicate of the incredibly generic "I done got a NullReferenceException" question? As stated, as far as I can tell (which is the crux of the matter as I must've missed something), I've met all the requirements that SQL CLR places on me (primarily initialising all member variables in Init to allow for instance re-use). This is the simplest code that reproduces the issue. I appreciate stackoverflow gets littered with "I done got a NullReferenceException, halp!" questions, but that doesn't mean that...
Aug
5
revised Custom aggregate function intermittently throws NullReferenceException
Removed "partial" as there's no other code that comprises this class and it muddies the waters here
Aug
5
comment Custom aggregate function intermittently throws NullReferenceException
No idea why the partial is there as there's only the one file that defines this class. Though it'll make both our comments seem a bit odd, I'll remove the partial from the code to aid clarity :)
Aug
5
comment Embedding app.config file into executable or changing runtime version in other way
What's the problem you're trying to solve? i.e. Why do you want your application to run under CLR4, without the .config file being present, if it's available? There may be a solution to that which is easier/more palatable than solving "run under CLR4, without the .config file"...
Aug
5
asked Custom aggregate function intermittently throws NullReferenceException
Aug
5
awarded Autobiographer
Aug
4
revised ASP Nested Tags in a Custom User Control
Added link to blog post and code sample
Aug
3
awarded Nice Answer
1 2 3 4 5