Book Image

WiX Cookbook

By : Nicholas Matthew Ramirez
1 (1)
Book Image

WiX Cookbook

1 (1)
By: Nicholas Matthew Ramirez

Overview of this book

Table of Contents (20 chapters)
WiX Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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...

Using the ODBCDataSource element, create a data source for SQL Server, as shown in the following steps:

  1. Add a component to the project that will contain our ODBC data source:

    <ComponentGroup Id="ProductComponents" 
                    Directory="INSTALLFOLDER...