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. ...
Get Programming Microsoft® ADO.NET 2.0 Core Reference, 2nd Edition 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.