Some New Features in Visual Studio 2005 and SQL Server 2005

This is a list that I put together in a few hours, so don't work at critiquing it please.  I borrowed a few things here and there for the sake of raising an awareness of what new features are available in VS2005, and SQL2005.  I'll be listing it tomorrow night when I present with Dave McKinstry at the Dallas .Net User Group.  We're presenting the Community VS2005 Launch like last month at the Dallas C# SIG.  Some of the examples listed are in the samples at the Dallas C# SIGIf anyone knows of a comprehensive list with all technologies, please reply.  This is actually more of a conversation starter so people don't continue to write classes that come out of the box.  Hope it helps someone.

Some New Features in Visual Studio 2005 and SQL Server 2005




Other Resources



.Net Framework

Generic BindingSource and BindingList,vs.80).aspx


Sorting the BindingList


New Namespaces

System.Net.NetworkInformation – Helful information such as NetworkAvailabilityChangedEventHandler


Partial Classes

Segment code logically into files that when compiled, make a complete assembly.  For example, with Winform development, this moves the Winform designer regions into another file matching the same namespace and class.


Configuration File / Settings Editor

Project properties have a Settings tab where you can add custom properties that is placed in strongly typed classes for retrieval.  Two modes are available, Application and User mode.  Application mode provides the properties in read-only mode while user mode allows the properties to be easily modified and saved.  VB.Net can access these settings from the My namespace.



MSDN TV Episode:  “What’s New in .Net Remoting for .Net Framework 2.0”

January 20, 2005

42 minutes


The C# Language

·         Generics


·         Anonymous methods


·         Iterators


·         Partial types


·         Static classes

Can contain only static members

Cannot be type of variable, parameter, etc.

System.Console, System.Environment, etc.


·         Property accessor accessibility

Allows one accessor to be restricted further such as restricting set {…} to be internal with get {…} as public


·         Namespace alias qualifier


Visual Basic.Net

  • New VB.Net My Namespace features with Winforms

Such as:

·         NetworkAvailabilityChanged - Occurs when the network availability changes.

·         Shutdown - Occurs when the application shuts down.

·         Startup - Occurs when the application starts.

·         StartupNextInstance - Occurs when attempting to start a single-instance application and the application is already active.

·         UnhandledException - Occurs when the application encounters an unhandled exception.


  • Pre and Post Build Events

Build events are now available in VB.Net to handle special build actions.  To access build events, go to project properties, click the Compile tab, the click the “Build Events” button.



Visual Studio IDE

  • Visual Basic Team’s Top 10 List


  • Learning Visual Studio 2005 IDE - The Toolbox


  • New Features of Visual Studio 2005 Editor


  • Code Snippets


  • Snipped Editor for VB.Net from the VB.Net Team




·         Read:


·         Overview of ADO.NET 2.0(Whidbey) New Features


·         DataSet – Scalability and Index Improvements


·         Connection String Building



SQL Server 2005

·         Microsoft Webcast:

T-SQL Enhancements in SQL Server 2005


·         TSQL Enhancements

Ranking Functions

Recursive Queries with Common Table Expressions (CTE)

Pivot and Apply Relational Operators

Declarative Referential Integrity

Try / Catch

DDL Triggers and Event Notifications

Xml Data Type

MAX data sizes for NVARCHAR

OUTPUT Keyword:

Sometimes you need to take some external data and import it into the database in a normalized manner, and then insert into some additional tables the newly (automatically) created id to link some data.  Microsoft SQL Server 2005 (and Microsoft SQL 2005 Express Edition) supports a new TSQL keyword called OUTPUT.  Here's basically what it looks like:


INSERT INTO tablename (column1, column2) OUTPUT INSERTED.the_id VALUES (value1, value2)


The OUTPUT INSERTED.[*, column] portion is key here.  Upon the row being inserted, the INSERT returns a result with whatever you specified; either a single column or all columns.  This allows you to insert data and not have to take an additional step to determine the resulting auto-generated id.  You could also use this to return *all* automatically created columns that you didn't pass into the INSERT and were created automatically by having defaulted value for those columns.


·         Service Broker

Ordered, queuing, transactional message / data delivery.


·         CLR Stored Procedures

Managed Data Access Inside SQL Server with ADO.NET and SQLCLR


CLR hosting provides developers with increased flexibility through the use of user-defined types and functions.


1. Enable managed assemblies to run in the SQL server:

sp_configure 'clr enabled', 1





2. Create a strong named assembly.


3. Run TSQL script to recognize a method in the assembly as if it were a typical stored procedure.  Example:


-- Add the assembly which contains the CLR methods we want to invoke on the server.

DECLARE @SamplesPath nvarchar(1024)

-- You may need to modify the value of the this variable if you have installed the sample someplace other than the default location.

SELECT @SamplesPath = replace(physical_name, 'Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf', 'Microsoft SQL Server\90\Samples\Engine\Programmability\CLR\')

   FROM master.sys.database_files

   WHERE name = 'master';



FROM @SamplesPath + 'AdventureWorks\CS\Contact\bin\debug\Contact.dll'

WITH permission_set = Safe;



CREATE PROCEDURE [dbo].[usp_CreateContact]


   @ContactData NVARCHAR(max)

   ,@ContactID int OUTPUT

   ,@CustomerID int OUTPUT   


AS EXTERNAL NAME Contact.[Microsoft.Samples.SqlServer.ContactUtilities].CreateContact;


4. Call the methods as a typical stored procedure.  Example:

EXEC dbo.usp_CreateContact N'<Contact xmlns=""><Individual>



·         Feature Pack for Microsoft SQL Server 2005 – November 2005

Updates for :


Core XML Services (MSXML) 6.0

OLEDB Provider for DB2

Microsoft Operations Manager 2005 Management Pack for Microsoft SQL Server 2005

Microsoft SQL Server 2000 PivotTable Services

Microsoft SQL Server 2000 DTS Designer Components

Microsoft SQL Server Native Client

Microsoft SQL Server 2005 Analysis Services 9.0 OLE DB Provider

Microsoft SQL Server 2005 Backward Compatibility Components

Microsoft SQL Server 2005 Command Line Query Utility

Microsoft SQL Server 2005 Datamining Viewer Controls

Microsoft SQL Server 2005 JDBC Driver

Microsoft SQL Server 2005 Management Objects Collection

Microsoft SQL Server 2005 Mobile Edition

Microsoft SQL Server 2005 Notification Services Client Components

Microsoft SQL Server 2005 Upgrade Advisor

Microsoft .NET Data Provider for mySAP Business Suite, Preview Version

Reporting Add-In for Microsoft Visual Web Developer 2005 Express


·         Improved Tools – Management Studio

Developers can utilize one development tool for Transact-SQL, XML, Multidimensional Expression (MDX), and XML for Analysis (XML/A). Integration with the Visual Studio development environment provides more efficient development and debugging of line-of-business and business intelligence applications.



·         XML and Web Services In SQL Server 2005

Advancements such as XQuery and a native XML data type will help enable organizations to seamlessly connect internal and external systems. SQL Server 2005 supports both relational and XML data natively, so enterprises can store, manage, and analyze data in the format that best suits their needs. Support for existing and emerging open standards such as Hypertext Transfer Protocol (HTTP), XML, Simple Object Access Protocol (SOAP), XQuery, and XML Schema Definition (XSD) will also facilitate communication across extended enterprise systems.


·         SMO Replaces DMO

SQL Distributed Management Objects (SQL-DMO) is a COM based management component.  It has been replaced with SQL Server Management Objects (SMO).  To list servers on the network, either of the two can be used:


//  Get the available servers on the network using the System.Data namespace.

DataTable serversWithSystemData = System.Data.Sql.SqlDataSourceEnumerator.Instance.GetDataSources();


//  Get the available servers on the network using the SQL Server Management Objects (SMO)

//  SMO will provide a few more fields.

DataTable serversWithSmo = Microsoft.SqlServer.Management.Smo.SmoApplication.EnumAvailableSqlServers(false);


Web Forms

The web forms model undergoes a minor tune-up in ASP.NET 2.0—there aren’t many dramatic differences. Some

of the changes take place behind the scenes—for example, pages now include even more events in their life cycle

so they can plug into other ASP.NET features, such as themes and the new data binding model.

This chapter concentrates mostly on the core web forms model that was established in ASP.NET 1.0. However,

you’ll find a few refinements. Here they are, in order of their appearance:


·         View state chunking

Instead of placing all your view state information into a single field, you can tell ASP.NET to split it into several fields of a certain size. This feature is primarily intended to resolve issues with proxy servers that don’t support really large hidden input fields.


·         XHTML support

Web forms now render themselves using XHTML-compliant markup. This is a major shift from ASP.NET 1.x, and it’s almost entirely painless.


·         Programmable Page Header

The <head> portion of a web page is now exposed as an instance of the HtmlHead server control. Using this control, you can programmatically change the title, add metadata, or add linked stylesheets to the page. If you’re a seasoned ASP.NET 1.x developer, you can hone in on these additions as you work your way through

this chapter.



·         Various Winform Samples:


·         Background Worker Control

The background worker control provides an easy drag and drop control so work can be processed on another thread easily.

DoWork                                Occurs when RunWorkerAsync is called.

ProgressChanged                  Occurs when ReportProgress is called.

RunWorkerCompleted         Occurs when the background operation has completed, has been canceled, or has raised an exception.


Example: FileListDownloaderForm.cs



·         AutoComplete Controls

The textbox and combo box have AutoComplete functionality with three properties: AutoCompleteMode, AutoCompleteSource, and AutoCompleteCustomSource.  The AutoCompleteCustomSource allows you to provide a string array but not a provider model so you can’t easily hook up a custom data source yet.


·         Splitter Container

Example: FileListDownloaderForm.cs



·         DataGridView

DataGridView FAQ:


·         Assembly Information Editor

On the project properties, “Application” tab, there is a button labeled “Assembly Information”.  This is an easy way to edit common settings or you can still edit the AssemblyInfo file manually.





·         Windows Mobile 5

·         Single toolset with Visual Studio 2005

·         Further unified Pocket PC and Smartphone platforms with common SQL Server 2005 Mobile Edition, soft keys UI concept, "persistent store" data model, and the application installer sharing the same application security model.

·         More managed APIs such as Messaging, Telephony, and Outlook Mobile data

·         Easier to build and test with a new device emulator

·         New UI and data designers, UI docking and anchoring

·         Accelerated graphics and games development with Direct3D Mobile

·         Richer media functionality with Windows Media 10 Mobile

·         Easier camera integration with the Windows Mobile 5.0 Camera APIs


  • What's New in the .NET Compact Framework 2.0




·         MSDN Documentation: New Features in the XmlReader Class


·         XmlReader Creation

In this release, the Create method is the preferred mechanism for obtaining XmlReader instances. The Create method uses the XmlReaderSettings class to specify which features the XmlReader instance should support.

For more information, see Creating XML Readers.


·         Data Validation

XmlReader objects created by the Create method can enforce validation using a document type definition (DTD) or Schema definition language (XSD) schema. The System.Xml.XmlReaderSettings.ValidationType property determines whether the XmlReader instance enforces validation. The System.Xml.XmlReaderSettings.ValidationFlags property configures optional validation settings. The XmlSchemaSet class is used to cache XML Schemas.

For more information, see Validating XML Data with XmlReader.


·         Data Conformance

XmlReader objects created by the Create method are, by default, more conformant than the XmlTextReader implementation. XmlReader objects created by the Create method support the following features by default:

§         Normalize new line characters.

§         Expand entities.

§         Add default attributes.

The System.Xml.XmlReaderSettings.CheckCharacters and System.Xml.XmlReaderSettings.ConformanceLevel properties allow you to specify the type of conformance checks you want to enable on the created XmlReader object. For more information, see Data Conformance Checking with XmlReader.


·         Type Support

Provides support for retrieving XML Schema definition language (XSD) schema information and permits callers to request values as simple-typed common language runtime (CLR) values.

The ReadContentAs and ReadElementContentAs methods can read content as system types rather than strings. These new methods allow users to get values in the representation that is most appropriate for the coding job without having to manually perform value conversions and parsing.

For more information, see Reading Typed Data.


·         New Helper Methods

The XmlReader class includes new methods that should make it easier to parse XML data:

§         ReadSubTree – Returns a new XmlReader that reads the current element and all of its descendants.

§         ReadToDescendant – Advances the reader to the next child element that matches the specified name.

§         ReadToNextSibling - Advances the reader to the next sibling element that matches the specified name.

§         ReadToFollowing - Advances the reader to the next following element that matches the specified name.

§         ReadValueChunk - Reads large streams of text embedded in an XML document in a streaming fashion.

§         ReadContentAsBase64 and ReadElementContentAsBase64 - Reads large streams of binary data embedded in an XML document in a streaming fashion and decodes the Base64 content.

§         ReadContentAsBinHex and ReadElementContentAsBinHex - Reads large streams of binary data embedded in an XML document in a streaming fashion and decodes the BinHex content.


·         Security Features

You can create an XmlReader object that prohibits document type definition (DTD) processing. Disabling DTD processing can be useful in preventing certain denial of service attacks. When DTD processing is disabled, the XmlReader object throws an XmlException when any DTD content is encountered. By default, DTD processing is disabled. To enable DTD processing, set the System.Xml.XmlReaderSettings.ProhibitDtd property to false before creating the XmlReader.


·         Entity Handling

XmlReader objects created by the Create method expand all entities automatically. An exception is thrown if entities are encountered that cannot be resolved


No Comments