Jan 12 2009

Transact-SQL – Auto Increment Primary Key

Published by nick under My Blog,Work

If like me you learnt SQL using MySQL, and then gone into a job and found yourself using Microsoft’s SQL Server, you’ll probably be as irritated as me to find that Transact-SQL does not feature the ‘AUTO INCREMENT’ keyword that MySQL provides. Fortunately, the solution is far easier here than it is in PostgreSQL.

All you need is to add IDENTITY(1,1) in your column definition. I’m not going to pretend to understand exactly what this does, only that it will Automatically increment and ID field for you. If anyone wants to enlighten me on exactly what it does, then feel free :)

An Example is below:

   1: CREATE TABLE dbo.myTable(
   2:     ID INT NOT NULL IDENTITY(1,1) PRIMARY KEY,
   3:     ColumnA VARCHAR(200),
   4:     ColumnB BIT
   5: )
   6:  

No responses yet

Jan 11 2009

Windows 7 – A Pleasant Surprise

Published by nick under My Blog

After a few delays by Microsoft, I finally got a hold of Windows 7 Beta this morning. I must say…I’m pleasantly surprised. It certainly does seem much much better than Vista was – even at the Beta stage!

Continue Reading »

No responses yet

Dec 19 2008

Page Refresh Animations in ASP.NET

Published by nick under Work

Page Refresh Animations

This refers to the way in which we can display some form of feedback to the user that the page is being updated, without the need for an ugly page flash or the page seemingly doing nothing.

 As always there are several ways to achieve this – a quick google will probably reveal several. Below is probably the most reliable method for our usages.

Continue Reading »

No responses yet

Nov 28 2008

Updates and new features…

Published by nick under My Blog

Right. So i finally decided it’d be a good idea to update my wordpress installation – V2.2 was a little out of date! I must say though, V2.6.x is suprisingly different – but in a good way. The admin panel is so much nicer to use. Looks and feels better too – full of all that Javascript goodness we come to expect from websites these days.

Continue Reading »

No responses yet

Nov 12 2008

Visual Studio 2008 Settings

Published by nick under Work

Right, I recently discovered some nice looking colour themes for Visual Studio 2008.

So, i’ve decided to share. I can’t be bothered to put a screen shot up, so if you want to see it you’ll just have to try it. Basically, it’s a dark colour scheme. Dark blue background, and brightly coloured text (but not so much so that it blinds you!). Anyway, point is i like to use it and i’m sharing.

VS2008 Colour Scheme VS2008 Colours and Editor Settings

There are two files – one of them contains my Text Editor settings as well as the Colour Scheme settings. The other is just the colour scheme. Enjoy.

No responses yet

Nov 09 2008

Time for a change…

Published by nick under My Blog

The keen eye among you may have noticed a slight change in this website. Not only that, but what i’m doing has changed a bit too….

Continue Reading »

No responses yet

Nov 06 2008

The ASP.NET ViewState…

Published by nick under Work

The ViewState in ASP.Net is one of those weird and wonderful things that Microsoft obviously thought was a good idea at the time. Granted, it is quite useful but as with all things like that, it comes with a price – and a fairly hefty one at that if not used sensibly. Continue Reading »

No responses yet

Oct 31 2008

Writing Date to Excel from ASP.NET and C#

Published by nick under Work

Ok, so i’ve just been working on outputting data from an ASP.NET based web app into an Excel Spreadsheet. I’m not going to go into the details of how to do that, but only how to avoid one little problem i encountered.
Continue Reading »

No responses yet

Jan 08 2008

Video Encoding

Published by nick under My Blog

As you may have noticed I’ve recently started adding video to my website which has added a whole new set of things to do. Hurray. Anyways…just thought I’d share exactly how my video is encoded etc.

Continue Reading »

No responses yet

Jan 06 2008

More Videos, SNOW! And exams :(

Published by nick under General

Firstly, more videos. Hurray. I’ve got a few more videos uploaded in the Videos page. The links are on the left. One of the videos is related to the second point of this post, and that is that it snowed the other day, somewhat of a rare occurrence in this part of the world despite it being cold and horrible most of the year. Anywho, one thing led to another and i decided to film some snowy action outside our house.

And finally…exams. They start tomorrow and they suck. Nuff said really :(

No responses yet

« Newer Entries - Older Entries »