This example shows the use of the EditAddSingle property. Use it to let your site visitor add a single record to your site database.
Add a new record

Field New record
ProductName
QuantityPerUnit
UnitPrice
UnitsInStock
UnitsOnOrder
ReorderLevel
Discontinued
Cancel

This is the code implementing the example:
<!--#include file="VBSdb/inc.asp"-->
<%
   VbsDbNew objVbsDb
   objVbsDb( "MdbPath" ) = "data/nwind.mdb"
   objVbsDb( "Sql" ) = "select ProductId,ProductName from Products"
   objVbsDb( "EditTableName" ) = "Products"
   objVbsDb( "EditValidateRequiredFields" ) = "ProductName|ProductName is required!"
   objVbsDb( "EditAddFieldDefaults" ) = "SupplierId|1;CategoryId|1;discontinued|true"
   objVbsDb( "EditHideFields" ) = "ProductId;SupplierId;CategoryId"
   objVbsDb( "EditAddSingle" ) = true
   VbsDb objVbsDb
   if VbsDbGetLastAction( objVbsDb ) = "SubmitAdd" then
       response.write "<h3 align=center>The new product has been added!</h3>"
   end if
%>
This demonstrative program connects to Nwind.mdb, the well known Microsoft Access sample database: the names of companies, products, people, characters, and/or data mentioned herein are fictious and are in no way intended to represent any real individual, company, product, or event. To download a copy of Nwind.mdb, please visit Microsoft's site.