Appendix II. Reinstalling the DACW and Other Missing Functionality in Visual Studio


Microsoft has taken a moralizing stance on some of the new data access features. For reasons only they understand, they have chosen to "hide" some Visual Studio features that many of you have been using from the beginning. For example, every single ADO.NET book, article, or course discusses how to create an updatable DataSet with the DataAdapter Configuration Wizard (the DACW). If you start up Visual Studio 2005, you won't find this wizard in the Toolbox (at least, not in the Whidbey Beta 2 build). The "Command" and "Connection" wizard icons for each of the providers are gone, too. Thankfully, these are still in the product, but they've been hidden because Microsoft doesn't want you to use themor cut yourself while running. If you're like me, I still find uses for these productivity aidsespecially when teaching folks how to use ADO.NET. Yes, I expect there are still lots of developers who still depend on them and will miss them as soon as they start using Visual Studio 2005. Thankfully, it's not hard to add them backjust follow these steps:

1.

Start Visual Studio and create a Windows Forms project. Sure, this can be done in any languageeven C#.

2.

Pin down the Toolbox tab, as you're going to create a new tab.

3.

Right-click below the items in the Toolbox and click "Add Tab". Give your new tab a meaningful name, like "Deprecated Data Components That Microsoft Doesn't Want Me to Use".

4.

Right-click again in your new tab and select "Choose Items...". This exposes the "Choose Toolbox Items" dialog (after a long wait while it's initialized).

5.

Scroll down to the section for your data access provider. For SQL Server, you'll want to add items from the list of SqlClient components. If you type "S", the pointer will move promptly to the first "S". You can also enter "SqlClient" in the Filter dialog to locate all matching components (as shown in Figure II.1).

Figure II.1. Adding back deprecated components in the Toolbar.


6.

Repeat this process for the ODBC and OLE DB components that you want to expose in the Toolbar. When you're done, you should have a new Toolbox tab with the ADO.NET components you've used for the last three versions (as shown in Figure II.2).

Figure II.2. The Toolbox with the missing ADO.NET 1.1 components replaced.


Unfortunately, not all of the productivity features we got used to in Visual Studio 2003 are present in Visual Studio 2005 and can't be added back. For example, when you want to create a quick call to a stored procedure and build the Parameters collection, you can (in Visual Studio 2003) drag a stored procedure from the Server Explorer to the form, and Visual Studio takes care of the rest. Sadly, this does not work in the 2005 version. I understand that one of the new refactoring add-ins can build a Parameters collection from a stored procedure, so all hope is not lost.




Hitchhiker's Guide to Visual Studio and SQL Server(c) Best Practice Architectures and Examples
Hitchhikers Guide to Visual Studio and SQL Server: Best Practice Architectures and Examples, 7th Edition (Microsoft Windows Server System Series)
ISBN: 0321243625
EAN: 2147483647
Year: 2006
Pages: 227

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net