For this example, we are going to use a MS SQL Server database. This doesn't mean you have to, as the SQL statements will work whatever the database; you'll just need to change the connection code.
Before we start writing any ASP code, create a new MS SQL Server database called testdb, and then create a new table in it called members. Add the following columns (we've included both the MS SQL Server, and the Access descriptions)
Name | SQL Server Data Type |
Access Data Type |
Notes |
id | int (AutoIncrement=True) | AutoNumber | Primary Key |
username | varchar (20) | Text (FieldSize=20) | Unique |
password | varchar (20) | Text (FieldSize=20) |
Now, we'll create a short ASP script that connects to the database. Save it as inc-dbconnection.asp.
inc-dbconnection.asp <%
|
Comments