O'Reilly logo

Programming Microsoft® ADO.NET 2.0 Core Reference, 2nd Edition by David Sceppa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Connecting to Your Database

Connecting to your database in a Web application is similar to connecting to your database in Windows applications. You still use an instance of the Connection class for your .NET Data Provider to manage the connection to your database. However, there are some slight differences to keep in mind when connecting in a Web application.

Connecting with Integrated Security

Throughout this text, we’ve used trusted connections to connect to the local SQL Express installation on your development machine:

Data Source=.\SQLExpress;
Initial Catalog=Northwind;Integrated Security=True;

You can use this same connection string at design time in a Web application, but you might encounter problems using this connection string at run time. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required