Retrieving events from SQL Server

Overview When executing some long-running server side processes on a SQL Server (Stored procedures or functions) would be nice to get progress messages, and why not, a percent value in order to show a progress bar in our application. In the past I’ve used different techniques to archive this, from SQL Assemblies for calling a SignalR server, to execute xp_cmdshell, and so many other esoteric ways. None of that solved the problem in an elegant way, but well, it worked… more or less…

Getting data from OLAP cubes

Overview Recently I had to read some data from different OLAP cubes and show this information in our application. This could be accomplished using ADOMD.NET client library, which is the multidimensional equivalent to the ADO.NET libraries. This library provides a set of classes (Connections, Commands and Readers) that allow developers to connect, query and get data from these multidimensional sources in the same way the classical ADO.NET library does. Maybe the easiest way to read data is using the class AdomdDataReader.

Connect via SFTP using SSH.NET

Overview In these times of APIs-everywhere, it may sound like an anachronism the use SFTP to connect to a remote server and get a list of files for exchanging information, but in the financial world (sadly) it’s more common than you think. In my current project I’ve to connect to a remote server via Secure File Transfer Protocol (aka SFTP) using a user name, a RSA private key and a phassphrase.

Remove diacritics (accents) in strings

Quick note How to remove diacritics (accents) from a C# string? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 public static string RemoveDiacritics(this string input) { var stFormD = input.Normalize(NormalizationForm.FormD); var len = stFormD.Length; var sb = new StringBuilder(); for (int i = 0; i < len; i++) { var uc = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(stFormD[i]); if (uc != System.Globalization.UnicodeCategory.NonSpacingMark) { sb.Append(stFormD[i]); } } return (sb.

Extract extra large icon from a file, folder or drive

Extracting system icons from Win32 Overwiew Hi, everyone! :) In a recent project I was required to show a list of files with their associated icons. It doesn’t sounds quite difficult, and in fact it is not. Except if you have to deal with files in network paths or you want to get different icons sizes, apart the typical 32×32. And well, that was the case If you only need local files and sizes of 32x32 píxels you can achieve this using the static method ExtractAssociatedIcon in the class System.

MVP site interview

My 5 minutes of glory 😂 Yesterday the guys of MS published my brief interview MVP site. However, it is not the full version, that I copy here. About Lluís Franco Born in Barcelona (Spain) with more than 20 years of experience in the software development sector, now lives in Andorra for the past 15 years with his family. Lluis holds a number of Microsoft official certifications such as MCP and MCTS and has been recognized as MVP for the past 10 years due to his active participation and moderation in the MSDN forums since 1997.