Category Archives: Programming

Changing Default Parameter Value SSRS (SQL Server Reporting Services) 2008

If you’re here you have probably found that if you’ve deployed a report to your server updating the default parameter values and redeploying has no effect on the server report. E.g. I had a report with an integer parameter with … Continue reading

Posted in Programming | Tagged , , , , , | Leave a comment

Image Slideshow on Windows Form C# with Timer Control

Quick example of how to display an image control that loops through a folder of images. Firstly drop a timer control onto your form (name: tmrNextImage), set the Interval to 1000 milliseconds (1 second) and set enabled to true. Next … Continue reading

Posted in Programming | Tagged , , , , | 7 Comments

Find all Subdirectories from a given path using C# – With Error Handler

In my earlier post () I showed how you can iterate through folders and add the folder names to a list (lstDirs). The problem with this code was that if you encountered a folder you didn’t have access to it … Continue reading

Posted in Programming | Tagged , , , , | Leave a comment

Search for Value in Multiple Columns SQL Server T-SQL

Having to write some SQL SELECT’s on some un-normalized tables left me thinking there has to be a tidier way. I started with: (@SCAN_ID is a variable declared earlier) I ended up with: Maybe not a massive improvement, but personally … Continue reading

Posted in Programming | Tagged , , , | Leave a comment

Browse for SQL Server 2008 R2 Installation Media

When running the SQL Server Installation Centre I was receiving the above error. This seems to be caused by the software being installed to a temp folder which is subsequently deleted post install. Mine had been installed from a folder … Continue reading

Posted in Programming | Tagged , , | 2 Comments

SQL Server 2008 R2 Maintenance Cleanup Task Not Deleting bak Files

I noticed that my old backup files were not being deleted despite my Cleanup Task being set to delete all bak files more than a day old. Having checked, and double checked the path, file age, etc. I decided it … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Multiple OR’s in T-SQL WHERE Condition SQL Server

Just been rewriting some SQL Server stored procedures for a client. There were a lot of SELECT statements like the one below: I’ve seen this quite a few times, and I’m not suggesting this is wrong, however I find that … Continue reading

Posted in Programming | Tagged , , , | Leave a comment

Null Dates in SQL Stored Procedure called from C# – Conversion Error DateTime2 DateTime

One issue with calling stored procedures from C# is with null date parameters. If you try to pass an unassigned DateTime type to the parameter you will receive an error regarding conversion of DateTime2 to DateTime data type. One way … Continue reading

Posted in Programming | Tagged , , , , , , | 1 Comment

Assign Event to Multiple Controls, Windows forms and C#

Lets say that you want the same event to be triggered by multiple controls. You don’t want to have to rewrite the code for all the controls. Here we’re going to use four buttons with one shared event that shows … Continue reading

Posted in Programming | Tagged , , , , , | Leave a comment

Find all Subdirectories from a given path using C#

To load the subdirectories for a given file path. We simply need to use the GetDirectories method of DirectoryInfo (this example loads the results into a listbox lstDirs) E.g. N.B. sPath needs to be a full path including drive letter … Continue reading

Posted in Programming | Tagged , , , , | Leave a comment