development blog for the wicked stuff we encounter

I recently found a way to do a distinct operation on the DataTable class in dotnet 2.0: DataTable products = GetProductList(); DataView dv = new DataView(products); products = dv.ToTable("products", true, new string[] {"ArticleId","ArticleName","Description"}); And the products DataTable will be a distinct list of all products (in this case, one product can belong to two categories as well - so there are duplicate items with different price, attributes etc.).

I like to use my own User Controls and Web Controls in my web projects, and when I was building the current one on a lovely morning at 4am, Visual Studio 2005 bombed me with 365 warnings (one for each day of the year:))  stating there's a type conflict in my project. What the hell?:) I really hate errors and warning messages, so I checked what happened:  when i created a web control in my project, and dropped the control to a webpage in design view, visual studio 2005 added the /bin/projectname.dll as a reference to the project itself - and when i was building, the two dlls (the old and the new) had the same types. the solution was to remove the self-reference... update: i found the same error reported on Microsoft Connect.

I needed to work with a MySql server which was behind a firewall, and only the port for SSH was open. Of course, in this case, I need to use the portforward feature:ssh -l myusername -L:3306:localhost:3306 However, if I type 'localhost' in MySql Query Browser, it tries to connect via socket - of course which is not avaliable. I tried my local IP and the outer one (I'm behind NAT), but nothing worked... then came the idea: use localhost's IP address! So in the connection window, I typed:, and voila, the window opened listing all tables...:)