LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

VB.Net and C# – the difference in OO syntax part 2

Part 1 Understanding C# Class and Member Modifiers How to: Control the Availability of a Variable Access Levels in Visual Basic Working with .NET access modifiers Classes and their access modifiers So let’s see what the differences are between the access modifiers of VB.Net and C#. I found this list. For VB.Net that would be: Private Protected Friend Protected friend Public In C# that will be: private protected internal protected internal public So Friend becomes internal in C# and C# uses a different capitalization. That is a good thing to remember.

Read More...

ReportViewer and the RSPrintClient Control Problems

Ever seen this when you try to use the print client control in SSRS, “Unable to load client print control”? Well if you haven’t I’m willing to bet you will. Member pmch22 and myself worked on this little fun error message for the entire day. First the problem seem to have come up a few weeks ago when someone tried to print and received this message. They downloaded a patch and applied it but no luck. I thought I had the problem fixed at the SSRS instance level but that was a long way from the truth.

Read More...

SQL Agent Job Notifications

This falls under DBA scripting and automation. I am going to try to key on these things in the next few weeks after reading Dan’s blog titled, “Scripting DBA Actions” here http://blogs.msdn.com/dtjones/archive/2008/11/23/scripting-dba-actions.aspx If you have a landscape that is of some size then on most of your instances you’re going to find yourself mixed into dozens of SQL Agents Jobs that can become a daily task to ensure they ran correctly. Again this is on the basis you have no monitoring tools that will already notify you of problems and failures. Now we all know there is the Notifications option on all jobs. This is great for basic failures, successful runs and completions but if you’ve ever had to write a job that really did something other than a backup task you’re going to find the need for more options in notifying you when certain things fail and or complete. This is also helpful when you don’t want large SQL Tasks to stop an entire job but in the same event let you know one update may have not been successful.

Read More...

VB.Net and C# – the difference in OO syntax part 1

I am a VB.Net developer that writes C# code. I use C# for writing my test projects since Rhino mocks likes C# a lot better then it does VB.Net and we can all blame it on the bad lambda implementation that VB.Net 9.0 has. Lucky for us, this will improve in VB.Net 10.0. But I am writing this series of posts about the difference between C# and VB.Net because I am preparing for a promotion exam. The only way to get a promotion when working for the government is via an exam. And those exams are organized by some people in a land far, far away ;-). For this exam I had the choice between three languages Java, C# and ASP.Net. First question that comes to mind is “Since when is ASP.Net a language?” and then “Oh well”. So I had to choose between C# and Java. Since I don’t use the Java framework as much as I used to, I chose C#.

Read More...

Intranet site for Reporting Services Reports

Recently I was asked if I could design an intranet site to provide a single point access to all reports developed using Reporting Services. To begin with I developed a site where the Report URL was saved as a hyperlink on the page. Soon I realized that there were 50 odd reports and new reports keep getting added every now and then. This way I would have to keep updating the hyperlinks forever. I had to make the site dynamic by getting the latest reports from the report server. From security standpoint, access of the reports should be based on the login and any changes in security should be reflected realtime.

Read More...

VB.Net: drawing a string on a panel that is created at runtime.

Today I had to draw a text on a panel that I had created at runtime. This is actually pretty easy but there are some pitfalls that can take a few minutes to figure out. This is all still in the good old windows forms, none of that WPF magic for me ;-). So first you create a form. And then in the load event of that form we create this.

Read More...

Some bugs just never go away

Some bugs just don’t seem to be the trouble to fix. I had this unusual problem with a treeview (the one that can be found at System.Windows.Forms.TreeView) and disappearing icons. Just look at this. You can see that there is nothing wrong with the icons or the imagelist because the button just above the treeview uses an icon from the same imagelist as the treeview. Now this seems to be a known bug. Just look at this post http://forums.microsoft.com/MSDN/ShowPost.aspx?siteid=1&PostID=965968, which is kinda funny because the OP posted on 28 nov 2006. Just 1 day shy of 2 years ago. Which makes it VS 2005. And for Microsoft it’s a known bug but fixing it is not an issue.

Read More...

SQL Server 2008 Upgrade Technical Reference Guide Available For Download

This 490-page document covers the essential phases and steps to upgrade existing instances of SQL Server 2000 and 2005 to SQL Server 2008 by using best practices. These include preparation tasks, upgrade tasks, and post-upgrade tasks. It is intended to be a supplement to SQL Server 2008 Books Online. Chapter 1 gives an overview of the technical issues and decisions that are involved in an upgrade to SQL Server 2008, as well as recommendations for planning and deploying an upgrade.

Read More...

SQL Server efficient handling of divide by zero

There are various methods to accommodate this problem, let’s examine a few of them and also check performance. When you divide two numbers, and the denominator is 0, the result of the operation is undefined. In reality, we usually define some alternative number to use (usually 0). In the example and the code I show below, I will assume that the expected result for a ‘divide by zero’ condition is 0.

Read More...

Isolator For SharePoint

If you have Sharepoint you should perhaps try out this new software. Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here. The first 50 bloggers who blog this text in their blog and tell us about it, will get a Full Isolator license, Free. for rules and info click here.

Read More...