web designer, sofware developer
In: Computers
9 Jun 2009If you try and make a change to a table in SQL Server 2008 Management Studio, such as the reordering of columns, or inserting a column in the middle of the table, you may see this message:
Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can’t be re-created or enabled the option Prevent saving changes that require the table to be re-created.
I’m not sure why it appears for this version of SQL Server, as I thought it was built on SQL Server 2005. Anyway, to get round it, perform the following:

In: Computers
4 May 2009One of the tasks that has been easy to implement in C# since 2005 has been the ability to drag and drop items into a treeview. I’ve been wanting to do the same for a WPF project, but there is a subtle difference.
For a WinForms application, you set the Effect property of the DragEventArgs object. For a WPF application, it’s now Effects (note the additional ‘s‘). So your drag enter code would become:
if (e.Data.GetDataPresent(DataFormats.Text))
{
e.Effects = DragDropEffects.Copy;
}
else
{
e.Effects = DragDropEffects.None;
}
Thanks to infoSupport for the heads up.
In: Computers
27 Apr 2009In C# WPF dialog results are different from Windows Forms. In Windows Forms you can set the value of the result in the button in the child form and retrieve it’s value in the parent. In WPF it’s different. Here’s how to do it:
1. In the Click function of the button on the child Window (the button you want to use to send the OK back to the parent), add:
DiaglogResult = true;
2. In the code behind of the parent Window (e.g. in the function of a menu option which opens the child window) add:
NewWindow newWindow = new NewWindow();
newWindow.ShowDialog();
if (newWindow.DialogResult.HasValue && newWindow.DialogResult.Value)
{
// User clicked OK
}
else
{
// User clicked Cancel.
}
More details are on the MSDN web site.
In: General
13 Apr 2009
We have all our gas appliances serviced by British Gas annually - just to make sure they’re working properly and won’t break down. As I prefer to do almost everything online, I was pleasantly suprised to read a letter from British Gas to say I can book my next service on the internet.
Problem is - I couldn’t. I typed in the supplied reference number and postcode, confirmed by address (everything was correct) and was then greeted by a message saying that it’s not possible to book a service online and I should ring them instead.
This is very poor customer service frankly. If you tell people you provide a service online, at least make sure they can and that it works before you tell them! If you don’t keep your word here, can we trust you when you tell us anything else?
[UPDATE 20/04/2009 - Received an e-mail from British Gas explaining that I should be able to log onto the web site and book an appointment. Everything went smoothly, so I don't know what the problem was. Well done to British Gas for fixing it though.]
In: General
13 Apr 2009I’ve just watched an interesting video by Loic le Meur on how to build a product with your community. Here are a few things I learned:
What your friends say matters more than PR or advertising.
You should blog about your new product every day.
Ship your product as soon as you can - even if it isn’t perfect.
Always answer, especially if the feedback is negative.
New internet users:
The encouraging thing is these rules are the same for everyone, including your competitors.
It is possible to turn enemies into friends (by great customer service).
Get closer to real friends:
Your community is your most important asset.
Get your product out as soon as possible.
Get the “public roadmap” out as soon as possible.
Execute as fast as you can.
xxx
The video can be viewed here.
Hello, I'm Adrian Johnson and I write software and develop web sites.
I am unavailable for contract work.
You can download my Portfolio (PDF) here.