<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"> <img src="http://thm-a02.yimg.com/nimage/b356013f0b81a1ba" width="575" height="130"> <head> <HR align=left width=570 color=#000000> <% Dimension variables Dim adoCon Holds the Database Connection Object Dim rsAddComments Holds the record for the new record to be added Dim strSQL Holds the SQL query to query the database Create an ADO connection object Set adoCon = Server.CreateObject("ADODB.Connection") Set an active connection to the Connection object using a DSN-less connection adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)};; DBQ=" & Server.MapPath("Users.mdb") Create an ADO record object Set rsAddComments = Server.CreateObject("ADODB.Record") Initialise the strSQL variable with an SQL statement to query the database strSQL = "SELECT tblUsers.User_Name, tblUsers.User_passwd, tblUsers.User_level, tblUsers.NAME, tblUsers.MAIL_ID, tblUsers.Place, tblUsers.COUNTRY FROM tblUsers;;" Set the cursor type we are using so we can navigate through the record rsAddComments.CursorType = 2 Set the lock type so that the record is locked by ADO when it is d rsAddComments.LockType = 3 Open the record with the SQL query rsAddComments.Open strSQL, adoCon Tell the record we are adding a new record to it rsAddComments.AddNewAdd a new record to the record rsAddComments.Fields("User_Name") = Request.Form("User_ID") rsAddComments.Fields(" ID@Webmail.com ") = Request.Form("E-mail") rsAddComments.Fields("User_Address") = Request.Form("Address") rsAddComments.Fields("User_City") = Request.Form("City") rsAddComments.Fields("User_State") = Request.Form("State") rsAddComments.Fields("User_Country") = Request.Form("Country") rsAddComments.Fields("Use_Zip Code") = Request.Form("Zip Code") rsAddComments.Fields("User_passwd") = Request.Form("Password") rsAddComments.Fields("User_passwd") = Request.Form("Password again") Write the d record to the database rsAddComments.Update