Easy Tutorial
❮ Ado Getstring Ado Recordset ❯

ADO "Add Record"


We can use the SQL INSERT INTO command to add records to tables in the database.


Adding Records to Tables in the Database

We want to add a new record to the Customers table in the Northwind database. First, we need to create a form that includes the input fields from which we collect data:

When the user presses the submit button, this form is sent to a file named "demo_add.asp". The file "demo_add.asp" contains code that can add a new record to the Customers table:


Important Notes

When using the INSERT command, please note the following:


Regarding Fields with No Data

In MS Access databases, if you set the AllowZeroLength property to "Yes", you can enter zero-length strings ("") in text, hyperlink, and memo fields.

Note: Not all databases support zero-length strings, and errors may occur when adding records with blank fields. Therefore, it is important to check the data types supported by the database you are using.

❮ Ado Getstring Ado Recordset ❯