Major topics covered in this class:
- Setting up a Database
- Connecting to a Database
- Using ODBC Data Sources
- Reading Records from a Table
- Looping Through a Set of Records
- Adding Records to your Table
This is the big one: how to use a
Database on your web site. We'll begin by learning a little bit
about databases and exactly what they are. We will be using a Microsoft
Access 2003 database in today's class (although later on I'll show you
how to connect to a different database type). We'll create a simple
Customer table and save our database.
Getting your database set up on your Web server
is no easy task. I'll show you exactly what you have to do to get your
database online and working. We'll set up the permissions on your
Windows server so that people have access to read and write information
from your database.
Next, we'll write an ASP script to connect
to the database, open a table, and display some data from your
records. If you can get this to work, everything else is going to work
just fine for you. This screen shot doesn't look like much, but it's the
first name of the first person in my customer table:
If you're not using Microsoft Access, I'll show
you how you can use an ODBC connection on a Windows Server to
connect to any other type of database, such as SQL Server,
Oracle, even an Excel spreadsheet or delimited text file.
Since we know how to read in one record from our
database, now I'll show you how to loop through all of the
records in your database and display them all on the screen in a nice,
pretty, formatted HTML table.
Finally, we'll learn how to add records to
our database. This is important if you want to be able to save any new
information to it.
Like I said earlier, this is the big one.
Don't miss this class if you want to do anything with databases on your
web site - including building shopping carts, blogs, user information
sites, etc.
|