{"id":677,"date":"2008-08-31T10:57:00","date_gmt":"2008-08-31T10:57:00","guid":{"rendered":"\/blogs\/bobb\/post\/Visual-Studio-2008-SP1-and-SQL-Server-2008-SQLCLR-features.aspx"},"modified":"2008-08-31T10:57:00","modified_gmt":"2008-08-31T10:57:00","slug":"visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/","title":{"rendered":"Visual Studio 2008 SP1 and SQL Server 2008 SQLCLR features"},"content":{"rendered":"<p>\nWhen SQL Server 2008 shipped, Visual Studio 2008 SP1 and .NET 3.5 SP1 shipped a few days later. Visual Studio SP1 contains some neat enhancements that allow you to use SQL Server 2008 databases in Server Explorer and the related designers.&nbsp;There&#39;s support&nbsp;for SQL Server change tracking in the Sync Services designer. The EDM and LINQ to SQL designers know about DateTimeOffset (datetimeoffset)&nbsp;and TimeSpan (time)&nbsp;in SQL Server 2008. Server Explorer also knows about geometry, geography, and hierarchyid. Very nice.\n<\/p>\n<p>\nI often use the SQLCLR projects (that&#39;s Database Project under your programming language) that provide templates, auto-deployment of assemblies and CLR-based database objects, and an &quot;Add Reference&quot; dialog that allows adding references only to system libraries that are classified as &quot;safe to use&quot; (i.e. have been tested with SQL Server) and assemblies that already exist in your auto-deploy target database. Makes the base functionality more accessible to programmers.&nbsp;When I wrote samples of SQL Server 2008 functionality I didn&#39;t use those projects, because they didn&#39;t yet support some of the new functionality. So I thought I&#39;d go back in and check.\n<\/p>\n<p>\nAnother reason I checked is because I sometimes get feedback from programmers on newsgroups\/forums that, if its not exposed in Visual Studio (or in SSMS Object Explorer to give another example) the base functionality&nbsp;must&nbsp;not actually&nbsp;exist. You&nbsp;CAN program SQLCLR objects that use ALL of these features&#8230;just use an ordinary Class Library project and write your DDL by hand.\n<\/p>\n<p>\nFirst thing I noticed is that there is no special SQLCLR project for C++. In VS2005 it was called &quot;SQL Server Project&quot; but in VS2008 it&#39;s gone. That leaves us with projects for C# and VB.NET. But not a lot of people coded SQLCLR in managed C++.\n<\/p>\n<p>\nNext, I tried out my SQL Server 2008-specific features. Here&#39;s a rundown. <br \/>\n&nbsp; The new supported libraries System.Core and System.Xml.Linq don&#39;t appear in Add References dialog.<br \/>\n&nbsp; Autodeploy doesn&#39;t recognize the system .NET-based data types SqlHierarchyId, SqlGeometry, SqlGeography.<br \/>\n&nbsp; Autodeploy knows about the mapping of DateTimeOffset in SQL Server 2008, but doesn&#39;t know about TimeSpan to SQL Server&#39;s time data type.<br \/>\n&nbsp; Can&#39;t autodeploy a multi-input user-defined aggregate.<br \/>\n&nbsp; Can&#39;t autodeploy a large user-defined aggregate (in fact it doesn&#39;t seem to like any UDAgg with Format.UserDefined).<br \/>\n&nbsp; Autodeploy always maps the .NET type DateTime to SQL Server&#39;s datetime. But in 2008 DateTime can map to SQL Server&#39;s datetime, datetime2, or date. Perhaps an enhancement to SqlFacet.<br \/>\n&nbsp; I can&#39;t specify &quot;order by&quot; for an ordered TVF during autodeploy.<br \/>\n&nbsp; Using a nullable type as a parameter&nbsp;fails in autodeploy.\n<\/p>\n<p>\nBear in mind that these SQL Server 2008 features <strong>do<\/strong> work as advertised if you use Class Library projects and manual deployment (ie, roll your own DDL).\n<\/p>\n<p>\nI did file a bug <a href=\"https:\/\/connect.microsoft.com\/VisualStudio\/feedback\/ViewFeedback.aspx?FeedbackID=365408\">on Connect<\/a> for these. Maybe it should have been an enhancement request instead, but I really thought SQL Server 2008 support would include these and they just weren&#39;t in the beta yet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When SQL Server 2008 shipped, Visual Studio 2008 SP1 and .NET 3.5 SP1 shipped a few days later. Visual Studio SP1 contains some neat enhancements that allow you to use SQL Server 2008 databases in Server Explorer and the related designers.&nbsp;There&#39;s support&nbsp;for SQL Server change tracking in the Sync Services designer. The EDM and LINQ [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,38],"tags":[],"class_list":["post-677","post","type-post","status-publish","format-standard","hentry","category-sql-server-2008","category-sqlclr"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.9.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Visual Studio 2008 SP1 and SQL Server 2008 SQLCLR features - Bob Beauchemin<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Visual Studio 2008 SP1 and SQL Server 2008 SQLCLR features - Bob Beauchemin\" \/>\n<meta property=\"og:description\" content=\"When SQL Server 2008 shipped, Visual Studio 2008 SP1 and .NET 3.5 SP1 shipped a few days later. Visual Studio SP1 contains some neat enhancements that allow you to use SQL Server 2008 databases in Server Explorer and the related designers.&nbsp;There&#039;s support&nbsp;for SQL Server change tracking in the Sync Services designer. The EDM and LINQ [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/\" \/>\n<meta property=\"og:site_name\" content=\"Bob Beauchemin\" \/>\n<meta property=\"article:published_time\" content=\"2008-08-31T10:57:00+00:00\" \/>\n<meta name=\"author\" content=\"Bob Beauchemin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bob Beauchemin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/\",\"name\":\"Visual Studio 2008 SP1 and SQL Server 2008 SQLCLR features - Bob Beauchemin\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website\"},\"datePublished\":\"2008-08-31T10:57:00+00:00\",\"dateModified\":\"2008-08-31T10:57:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server 2008\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/category\/sql-server-2008\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Visual Studio 2008 SP1 and SQL Server 2008 SQLCLR features\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/\",\"name\":\"Bob Beauchemin\",\"description\":\"SQL Server Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e\",\"name\":\"Bob Beauchemin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g\",\"caption\":\"Bob Beauchemin\"},\"sameAs\":[\"http:\/www.sqlskills.com\/blogs\/bobb\/\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/author\/bobb\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Visual Studio 2008 SP1 and SQL Server 2008 SQLCLR features - Bob Beauchemin","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/","og_locale":"en_US","og_type":"article","og_title":"Visual Studio 2008 SP1 and SQL Server 2008 SQLCLR features - Bob Beauchemin","og_description":"When SQL Server 2008 shipped, Visual Studio 2008 SP1 and .NET 3.5 SP1 shipped a few days later. Visual Studio SP1 contains some neat enhancements that allow you to use SQL Server 2008 databases in Server Explorer and the related designers.&nbsp;There&#39;s support&nbsp;for SQL Server change tracking in the Sync Services designer. The EDM and LINQ [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/","og_site_name":"Bob Beauchemin","article_published_time":"2008-08-31T10:57:00+00:00","author":"Bob Beauchemin","twitter_misc":{"Written by":"Bob Beauchemin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/","url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/","name":"Visual Studio 2008 SP1 and SQL Server 2008 SQLCLR features - Bob Beauchemin","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website"},"datePublished":"2008-08-31T10:57:00+00:00","dateModified":"2008-08-31T10:57:00+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/visual-studio-2008-sp1-and-sql-server-2008-sqlclr-features\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/bobb\/"},{"@type":"ListItem","position":2,"name":"SQL Server 2008","item":"https:\/\/www.sqlskills.com\/blogs\/bobb\/category\/sql-server-2008\/"},{"@type":"ListItem","position":3,"name":"Visual Studio 2008 SP1 and SQL Server 2008 SQLCLR features"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/","name":"Bob Beauchemin","description":"SQL Server Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/bobb\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e","name":"Bob Beauchemin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g","caption":"Bob Beauchemin"},"sameAs":["http:\/www.sqlskills.com\/blogs\/bobb\/"],"url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/author\/bobb\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts\/677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/comments?post=677"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts\/677\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/media?parent=677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/categories?post=677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/tags?post=677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}