hi guys..i m trying to do a mini registration page which request user to type in their "email" & "name". then it will capture the info and store into the Access Database. My access database name is "MyCustomers" and having a table in it name "tblCustomerInfo" with 4 field "ID", "Email", "Name", "DateEntered". i run from IIS. below are mine 2 asp file code..i dunno where went wrong..pls help..thanks
formpage.asp
<FORM NAME="YourFormName" METHOD="Post" ACTION="resultspage.asp">
<TABLE>
<TR><TD>Email: </TD>
<TD><INPUT TYPE="text" NAME="Email" SIZE="50"></TD></TR>
<TR><TD>Name: </TD>
<TD><INPUT TYPE="text" NAME="Name" SIZE="50"></TD></TR>
</TABLE>
<INPUT TYPE="submit" NAME="Submit" VALUE="Submit Form">
</FORM>
resultspage.asp
<%@ Language="VBScript" %>
<% Option Explicit %>
<%
Dim ConnectionString
ConnectionString = ("DRIVER={Microsoft Access" &_
"Driver (*.mdb)};DBQ=" &_
"C:\Inetpub\wwwroot\MyCustomers.mdb;")
DIM objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "ConnectionString"
objRS.AddNew
objRS("Email") = Request.Form("Email")
objRS("Name") = Request.Form("Name")
objRS("DateEntered") = Date()
objRS.Update
DIM bookmark
bookmark = objRS.absolutePosition
objRS.Requery
objRS.absolutePosition = bookmark
DIM strCustomerID
strCustomerID = objRS("ID")
%>
<p>Thank you for reigstering with us. Here is your Customer ID: <% =strCustomerID %></p>
<%
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
Enter your message below
Sign in or Join us (it's free).