Connecting to a Database Introduction

Databases are a invaluable tool for storing large amounts of data in a structured and organized way. If you had an online store you could use a database to hold all your products details, such as price and availability. Your webpage would need to access the information in the database to display the product and all its details.

Another example of information a database could store would be all the usernames and passwords for a particular website. Once someone tried to log in their username and password would be checked against the database, if the username and password were valid (i.e. already existed in the database) then they would be granted access to the protected pages of the site i.e. a members area.
The poll on this site is an example of information being stored in an Access database. If you click on the view results you will see the voting pattern. The number of votes cast is stored in the database as well as plenty of other information such as the poll question and the poll options that relate to the current poll question.

The 3 main types of databases used with ASP are Access, SQL Server and Oracle. This site primarily deals with Microsoft Access.

To benefit from information that a database can hold we need our webpage (our ASP file) to be able to connect to the database. Fortunately this is possible using the objects that Microsoft's ADO technology provides.

Get the best asp hosting provider from web-hosting-top.com and save up to 30%

Advertisements



MembersPro

MembersPro PayPal - ASP Membership software

Plug and play ASP membership script that integrates with PayPal to let you charge recurring membership fees.

Global ASP.NET Hosting Leader - Click Here