Me and Adam talking Silverlight, C#4, .NET4 and VS2010

image
Figure: Me and Adam Cogan had a great but exhausting day, talking about current technologies in Sydney

 

When Adam went to the Pub, I ran to the university UTS to teach Business Intelligence - Cubes

SQL Server Integration Services - QA from the 1st BI class

Q1 How to trigger SSIS/SSRS jobs manually/on-demand without using the SQL Agent. How can I let end users trigger dtsx packages. Are there API hooks that I could run from a VBScript form (ideally) or perhaps .NET
Q2 I would like to know how you loop through different directory and upload files from various directories using SSIS. It will be great if you can give some demo.

Don't be lazy. Avoid the type "Tuple"

*Updated* 26. September 2010: Updated with comments from Adam Cogan
*Updated* 27. September 2010: Updated the comparison between anonymous types and Tuple's from blog comments
*Updated* 6. July 2017: Microsoft released C#7 that has a tuple type and tuple literal which resolves my below issues. https://blogs.msdn.microsoft.com/dotnet/2017/03/09/new-features-in-c-7-0/ 
Attention: From a Clean Code perspective I would consider the Primitive Obsession smell with tuples.

Tuple is a new type introduced in .NET4. My first impression of it was great, because it's a nice and easy way to group elements of a different type together. Sweet!
My first experience using the Tuple type was using it as a return value from a few methods, where I previously had an "out" parameter before, like this…
            string errormsg;
            User user;
            bool success = AuthenticationService.GetUser(usercode, out user, out errormsg);
Figure: Bad example - We should avoid "out" parameters, because it means we return 2 objects from a method.

SQL Server - Generate triggers for your "LastModified" columns with a fancy SQL script!

Every table in our database should have a "LastModified" column to record the last modified time of each row.
image[5]
Figure
: Sample table with a LastModified column

Our rule "Do you have standard Tables and Columns?" says the column should be called "DateModified" which has the same purpose.

How do you populate that field?

Latest Posts

Popular Posts