Chapter-Specific Configuration Issues


Some examples are a bit more difficult to use than others, due to issues with Visual Studio.

Chapter 8: Getting Started with ADO.NET

A few of the examples in this chapter access flat files, JET databases, and other ancillary files. These should be copied to a convenient place on your local hard disk or a network share. In the "ConnectionString Samples" example, the text files were placed in "D:\HHG\DVD\Databases\Data\Text Files". Of course, you can place these anywhere if you change the "strRootPath" string constant on line 4. You will also need to ensure that there is an ODBC-registered data source installed to access the text files. Use the Control Panel | Administrative Tools | Data Sources (ODBC) applet to configure a "Text File" system DSN.

Chapter 13: Managing CLR Executables

Because of an issue in Visual Studio 2005, one cannot correctly reference an Alias to the connection stringat least, not initially. For some reason, Visual Studio dereferences the Alias, looks up the actual server/instance name, and stores that behind the scenes. This means the first time you reference the alias, Visual Studio won't find it. This also means that when the Visual Studio solution file is first loaded, you'll have to point to an existing Data ConnectionVisual Studio will prompt you for that connection. This dialog also permits you to create your own connection. Since the CLR projects use one of several sample databases, I suggest that you click "No" when initially prompted to assign a new database connection for these CLR projects, as you'll want to know which of the test databases is being used. Open the project properties explorer and open the "Database" tab. Use the ellipsis button to choose an appropriate Data Connection, and set the initial catalog based on what's currently in the ConnectionString shown in the Properties dialog.




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