<%@ Language="VBScript" %> <% Option Explicit %> Form to database <% Dim FirstName, LastName, AccountType,AccountNumber Dim sConnString, connection, sSQL FirstName = Request.Form("FirstName") LastName = Request.Form("LastName") AccountType =Request.Form("AccountType") AccountNumber =Request.Form("AccountNumber") 'declare SQL statement that will query the database sSQL = "INSERT into shoppingcart (FirstName, LastName,AccountType,AccountNumber) values ('" & _ FirstName & "', '" & LastName & "', '" & AccountType & "', '" & AccountNumber & "')" 'define the connection string, specify database 'driver and the location of database sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & Server.MapPath("OnlineshoppingDb.mdb") 'create an ADO connection object Set connection = Server.CreateObject("ADODB.Connection") 'Open the connection to the database connection.Open(sConnString) 'execute the SQL connection.execute(sSQL) response.write "aaThe form information was inserted successfully." 'Done. Close the connection object connection.Close Set connection = Nothing %>