# Tuesday, 08 November 2005

In an interesting turn of events I learned that SQL Server 2000 doesn’t actually run transactions atomically when XACT_ABORT is set to OFF and an error occurs. A colleague of mine sent along a very interesting article describing basic error handling in stored procedures including the description of the XACT_ABORT option. Here’s quote from Books Online:

When SET XACT_ABORT is ON, if a Transact-SQL statement raises a run-time error, the entire transaction is terminated and rolled back. When OFF, only the Transact-SQL statement that raised the error is rolled back and the transaction continues processing.

And here’s the article I mentioned above. A very good read; should be mandatory for everyone coming within 10 meters of SQL Server 2000.

Error handling in stored procedures is a very tedious task, because T-SQL offers no exception mechanism, or any On Error Goto. All you have is the global variable @@error which you need to check after each statement for a non-zero value to be perfectly safe. If you call a stored procedure, you also need to check the return value from the procedure.

[Implementing Error Handling with Stored Procedures]

posted on Tuesday, 08 November 2005 11:13:51 (Romance Standard Time, UTC+01:00)  #    Comments [1] Trackback
# Wednesday, 26 October 2005

When all connections to a Terminal Services server are blocked, either by idle connections or active, you can always connect to the server by using

mstsc.exe -console

Just remember to only use that particular switch in emergency cases you can’t get at the server any other way, otherwise you’ll just end up blocking that session as well, leaving no way to get to the remote server.

posted on Wednesday, 26 October 2005 08:54:08 (Romance Daylight Time, UTC+02:00)  #    Comments [1] Trackback
# Wednesday, 19 October 2005

Recently I bought an Apple Airport Express, a marvellous little device enabling me to stream music from iTunes to my stereo. Everything worked well until I enabled my firewall, at this point iTunes could no longer connect to the speakers.

Searching around the internet I found that iTunes uses port 5353 to stream but opening the port in my firewall did nothing to make it work.

Using Active Ports I saw that a couple of connections to remote TCP ports 5000 and 6000 were trying to open to the Airport Express. Opening these remote ports in my firewall turned out to do the trick.

Thought I’d pass the info along as my searches through the Apple forums yielded nothing more than, “just turn off your firewall”

posted on Wednesday, 19 October 2005 17:36:41 (Romance Daylight Time, UTC+02:00)  #    Comments [2] Trackback
# Wednesday, 12 October 2005

IPod5GApple sure knows how to keep the competition on its toes. At the previously announced special event “Just One More Thing” tonight Apple announced new iPod with capacities of 30 and 60 GB and even smaller than the last models, 11mm for the 30 GB version and 14mm for the 60 GB one. They are available through Apples Online Store. Oh did I mention that they carry a color screen and the capability of playing video? No?  Video out is suppoted on the new iPods which presumably gives you the ability to play those videos on your TV, now all we need is a small wireless remote for the iPod.

Also a version 6 of iTunes was announced which features video support. An updated version of the iTunes Music Store actually supports video downloads in the forms music videos and series like Desparate House Wives.

Lastly new iMacs were announced, thinner and faster with builtin webcam and a small remote for controlling iTunes and a bunch of the iLife programs.

posted on Wednesday, 12 October 2005 20:44:16 (Romance Daylight Time, UTC+02:00)  #    Comments [1] Trackback
# Thursday, 06 October 2005

With Visual Studio 2005 just around the corner why not start looking forward to the 2007 release which work has already begun on? Take a look at the redesigned tabs which offer more information about the content and some kind of grouping functionality.

Tabicons1

Visual Studio 2007: File Tabs

posted on Thursday, 06 October 2005 14:20:07 (Romance Daylight Time, UTC+02:00)  #    Comments [2] Trackback

Looks like Visual Studio will be available real soon. Get ready to fire up your browser!

VS2005 RTM on MSDN 14th October!

posted on Thursday, 06 October 2005 13:58:37 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
BadMoose1
posted on Thursday, 06 October 2005 10:18:00 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Thursday, 22 September 2005
With the release of .NET 2.0 imminent, it’s a good idea to keep in mind what the release will offer and more importantly what it won’t offer. Scott Guthrie’s post entitled VS 2005 Web Project System: What is it and why did we do it?. Solution and project files are an aspect of .NET which has always been shrouded in much voodoo-ness, Scott gives us the low down on the new approach.
posted on Thursday, 22 September 2005 11:33:33 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Monday, 19 September 2005

LINQ (Language Integrated Query) enables SQL-like querying of objects, XML, and data from .NET languages, effectively making queries a first-class member of the .NET family. I just watched Anders Hejlsberg and it’s just nuts. I always get all worked up about new stuff, but this thing is truly something new and innovative, enabling developers to do complex data access with very little effort.

I’m deeply impressed with their solution to to this very complex problem, although I can’t help but wonder how the thing will perform. We’d seen most of what .NET had to offer when it was released in other languages, but this LINQ project is something I’ve never seen before.

Some keywords to watch out for extention methods, var, anonymous type.

In short, I want this, yesterday!

Take a look at the Channel9 video, it will rock your world.

posted on Monday, 19 September 2005 21:07:17 (Romance Daylight Time, UTC+02:00)  #    Comments [1] Trackback
# Tuesday, 13 September 2005

It’s with some satisfaction that I’m able to fill this one under the “solved” section. I’m currently building a Reporting Services solution which generates price lists which includes images of products along with some other information. My dataset includes a column with a path for the image of a particular product, but I can’t be sure that the image actually exists in the file system which means that a call to System.IO.File.Exists is needed. Thus my trouble begins: The methods always returns false even though the file is accessible…. Hours of head scratching ensues until I find that Reporting Services includes its own policy file which doesn’t allow access to the file system.

A quick change to the file Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\rssrvpolicy.config makes all the difference in the world. Initially I gave RS FullTrust just to narrow the potential sources of error to a minimum, but FileIOPermission will suffice in my case. Specifically I changed the following node from

                    <CodeGroup
                            class="FirstMatchCodeGroup"
                            version="1"
                            PermissionSetName="Nothing">

to

                    <CodeGroup
                            class="FirstMatchCodeGroup"
                            version="1"
                            PermissionSetName="FullTrust">

Also do remember that we are deailing with XML thus case very muhc matters. "Fulltrust" does not yield the same results as "FullTrust".

posted on Tuesday, 13 September 2005 13:59:09 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback