Chapter 38Connection Strings

Wrox.com Code Downloads for this Chapter

The wrox.com code downloads for this chapter are found at www.wrox.com/go/professionalvisualstudio2015 on the Download Code tab. The code and any related support files are located in their own folder for this chapter.

A large proportion of applications need to persist data, and the obvious candidate for enterprise software is a relational database. The .NET Framework provides support for working with SQL Server, SQL Server Compact Edition, Oracle, ODBC, and OLE DB databases. Many other databases are also supported through third-party providers. To connect to any of these databases, you need to specify a connection string that determines the location of the server or database engine, the name of the database, authentication information, and other connection parameters. This chapter explains how to create and store connection strings. In addition, you'll learn about encrypting and working with connection strings in code.

Connection String Wizard

Connection strings are similar to XML in that although they can be read it is neither an enjoyable experience nor recommended to work with them directly. Because connection strings are strings, it is easy to introduce errors, misspell words, ...

Get Professional Visual Studio 2015 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.