Author Archives: luc

How to use the result of a stored procedure in a MSSQL query

This problem is one I faced several years ago, but today I remembered it and thought someone might need the solution. The problem was simple, I needed to use the result of a stored procedure in a query. The client had used a backend using MS SQL as data store, but couldn’t adjust the database […]

Comments Off on How to use the result of a stored procedure in a MSSQL query  

C# base64 encoding and decoding

Today a simple thing, which I always have to lookup because I rarely use it. While communicating with some systems you have to encode the data using base 64 encoding. Base64 encoding is an encoding where every character is encoded using only a..z A..Z 0..9 + and /. This solves problems with special control characters.  […]

Comments Off on C# base64 encoding and decoding  

Use the WP8 appbar in ANY MVVM framework

While some frameworks, like Caliburn.Micro,have the possibility the use the appbar button with no code at all in the cod behind file, most frameworks don’t. This blogpost explains how you can use the appbar buttons in any mvvm framework the doesn’t support this feature, like MVVM Light or NRoute. The solution I found is very […]

Comments Off on Use the WP8 appbar in ANY MVVM framework  

Jquery.selectbox inside updatepanel fails postback

For an ASP.NET website I worked on a while ago I’ve use the jquery selectbox to make the dropdownlist look a little nicer (this is just an ugly example, I’m not a designer): This looks great and worked great until the dropdownlist was placed inside an updatepanel. The first time the paged was loaded it […]

Comments Off on Jquery.selectbox inside updatepanel fails postback  

MsSQL having max(id) = id problem –> row_number partition

One problem I haven’t been able to solve in a satisfying way is to create a query that returns a full row based on an aggregate function. Suppose we have the following database schema: If you need to write a query that returns the most expensive book for each customer you probably would first write […]

Comments Off on MsSQL having max(id) = id problem –> row_number partition