Differences between Visual Studio and SSMS

I am working on the BI modules for automotive data-analytics application these days. Which means that I am doing quite a bit coding and using T-SQL and in addition to Visual Studio 2005, I use quite often the Sql Server Management Studio for SQL Server 2005. In theory, both tools should be based on the Visual Studio IDE code base. Which is maybe true, but there are many quite annoying differences.

Some of the differences is available featureset. I wish there was single tool that had all the database features of both: strong scripting capabilities of SSMS and much better development support with debugging in VS-2005. One can understand that the tools were meant to serve different audiences, but why not make the SSMS a lightweight, trimmed down version of VS2005 targeting database and OLAP projects only ?

Some differences are really annoying though. One discovered today is related to GUID’s. Take the code sequence

Declare @MyGuid uniqueidentifier
set @MyGuid = NEWID()
select 'aaaaa', @MyGuid

You would expect that the result will be one row, consisting of value ‘aaaaa’ and some GUID, right ? Wrong. It is true only in SSMS as the picture shows:

SQL Server Management Studio

In Visual Studio 2005 SP1, the result looks like this:

Visual Studio without conversion

which on one side announces 1 row in resultset, but does show the same result as if the resultset was empty. As we found out, the problem is related to displaying the GUID value – if your resultset does not contain it, the row will show OK. Same result can be achieved using explicit conversion, as shown in the picture:

Visual Studio with conversion

Explore posts in the same categories: dotnet, sql, Windows

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: