Archive

Archive for the ‘Development’ Category

Adding a column to a replicated table in SQL Server 2005

February 4, 2010 completenutter2 Leave a comment

A problem that I have come across a number of times, yet seem to forget how to solve, is when you want to add a column to a table that you have set up for replication in SQL Server 2005.

SSMS (SQL Server Management Studio) modifies a table by simply dropping it, then re-creating it again with the new definition. However, when a table is replicated you’re not allowed to drop it (all kinds of nasty things could happen). Of course SSMS doesn’t tell you this is the problem, it just complains of something similar to this:

"Error validating the default for column 'rowguid'."

The only way (that I’ve found) round this, is to manually alter the table. Something I got taught at University, however I don’t use it much in practice so had to look it up. Luckily the syntax is nice and simple:

ALTER TABLE [table]
ADD [column] nvarchar(50) NOT NULL DEFAULT ('')
GO

This will add a column with the name ‘column’ to the table ‘table’ that is an nvarchar, with a max size of 50, that isn’t allowed to be NULL, and has a default value of an empty string.

Hopefully this will help someone, at the very least, it should give me somewhere to come back to if/when I run into this issue again.

Replication is great in theory, unfortunately, it is one of the most troublesome areas I’ve had to deal with.

Categories: Development Tags: ,

Creating new projects in SVN and Trac

January 10, 2010 completenutter2 Leave a comment

I have finally managed to introduce Trac and Subversion (SVN) at work. For the first few months, only some projects were put into SVN and fewer were put into Trac. This was partly due to people not feeling the need, but more to do with people not knowing/understanding how to create these projects.

Since I was the one who setup and researched SVN and Trac, I was fairly comfortable setting up a new repository or new Trac project, however it was quite daunting for any body else to step in and do, and even more daunting for me to try and explain the process to people.

Now that 2010 (twenty ten?) is upon us, it was decided we would move all active projects (those that we are still supporting) into SVN and create Trac projects.

We have about 50 applications that are still being supported, so even split among 4, I didn’t really want to have to go through the process of creating repositories and Trac projects for all of this, so I started looking into a way of scripting this. Since I’ve really not done much scripting before, it took me slightly longer than planned, but 2 work days (work was snowed off for 3 days this week) later and the script is ‘done’, so I thought I’d share it here, and share the difficulties I had. Maybe someone will find this useful.
Read more…

Categories: Development Tags: , ,

Google Wave

I just finished watching the Google Wave video on YouTube, here.

Google have come along with a new technology called Wave. Watch the video to find out more about it (be warned, its a video from the Google I/O developer conference, so its a little techy). Basically they have stepped back from the way we currently communicate with each other (e-mail, IM, SMS) etc and, reinvented it. Its hard to explain, just watch the video (its long though).

There are times when I think Google are becoming the new Microsoft, the way they’re taking over everything and the way they buy new companies, however… Google keep proving me wrong, time and time again they surprise me.

I’ll try and summarise the features that I can remember (guess they’re the good ones):

  • LiveAll communication when using Wave is live, even the typing, so no more “Buddy is typing…”. Waves come and go in your inbox, even the search is live.
  • Open SourceWoo! This means that other people can create their own Wave servers. Different wave servers can communicate with each other, using something called Foundation
  • CollaborationA wave is basically a smart document, or conversation. A smart docusation if you would. All the people involved with the Wave can edit the Wave at the same time and all the changes are displayed live on all the clients. Impressive :)
  • PlaybackWhen you are added to a Wave after it has already started, you will see all the edits/comments/conversations in the Wave already. Google have come up with a playback feature, which lets you see how the Wave was constructed. Another impressive feature.
  • ExtensionsGoogle demonstrated some pretty cool extensions, check them out in the video.
  • RosyLive Translation! This was probably the most impressive feature of Wave, Google demonstrated two people conversing, one in French and another in English, Wave was translating what was written, in real time!

Overall I was very impressed with Google Wave, obviously as a developer I find this thing interesting anyway, but hopefully this will change the way people communicate world wide. For the better. Open protocols, Open source.

Google have impressed me today.