There are many ways to connect to a database. sample connection strings for various types of databases and database connections.
Requirements
The following are the requirements for connecting to a database:
Active Server Pages (ASP) enabled Internet Information Services (IIS) version 5.0 Web server with Microsoft Data Access Components (MDAC) version 2.5 or 2.6 (with a Jet database engine)
Connectivity to a local or remote database
better you refer this site for clear reference guide:
Web Building