Creating an ODBC data source for a SQL Server instance

Microsoft Open Database Connectivity (ODBC) is a long-standing and established API for connecting to a database. Although there are alternative .NET-specific libraries, such as Entity Framework, ODBC is more general purpose and fits well into an environment where a variety of languages and technology stacks are used.

Many languages have libraries that can take advantage of ODBC. For example, C# can use either ADO.NET or the classes under the System.Data.Odbc namespace to connect to an ODBC data source. In this recipe, we will set up a data source to connect to a SQL Server instance called MySqlInstance.

Getting ready

Create a new setup project and call it OdbcDataSourceInstaller.

How to do it... ...

Get WiX Cookbook 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.