6. Sample Database, Scripts, and Connection Strings
The database used for all samples is a SQL Server 2000 database. It can be found at http://www.dominiondigital.com/AspNetCookbook2/.
As you browse the different sample programs throughout the book, you will see our preferred method of data access is OLE DB. From our experience of writing applications for corporate clients, we have learned that many projects start out using SQL Server but migrate to other database servers, such as Oracle or DB2, during the life of the project. By using OLE DB for data access, we gain the necessary layer of abstraction to switch database platforms easily when and if we need to, without having to change the underlying source code. Nevertheless, when you know that SQL Server will be your database platform for the long run, you will want to use SQL Provider to improve its performance, and Recipe 19.4 will show you how.
The connection string used in the samples throughout the book is shown next. It designates the server as localhost, the database as ASPNetCookbook2, the database user as ASPNetCookbook_User, and the password for the user as work. You will need to change these parameters to conform to your database installation.
Provider=SQLOLEDB;Data Source=localhost; Initial Catalog=ASPNetCookbook2; UID=ASPNetCookbook_User; PWD=w0rk"
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access