I need some answers please....

I am using Active Server Pages and have three files. The main file
Orders.html is a order form for a computer company. When the user
inputs his information in the required fields and pushes submit the
information is then looped back to Notify.asp for messages that
appear, and then all the information is then submitted back to a
Microsoft Access database.

But it will not submit information to the access database. Could
someone please advise to what I am doing incorrectly? I believe the
error is in the asp page, but not sure what I need to do to correct
it.

PLEASE HELP. Any help much appreaciated. This is a URGENT request to.

Here is my coding:
ORDERS.html file

CODE
<HTML>

<HEAD>

<TITLE>Nano Group Computer Sales & Support - Order Form</TITLE>


<LINK REL=STYLESHEET TYPE="text/css" HREF="main.css">


<SCRIPT language="vbscript">
Window.Status = "Don't forget to order. Your product will be shipped
within 2-4 business days!"
</SCRIPT>

</HEAD>


<TR VALIGN="Top">
<TD VALIGN="Top">


<CENTER>
<img SRC="logo.gif" height=103 width=985 align=Top>
</CENTER>

<DIV align=right>
<img SRC="navfront.jpg" height=20 width=18>
<A HREF="home.html"><img SRC="buttonHome.jpg" height=20 width=75></A>

<img src="nav.jpg" height=20 width=18>

<A HREF="trainframe.html"><img SRC="buttontraing.jpg" height=20
width=75></A>

<img SRC="nav.jpg" height=20 width=18>

<A HREF="tech.html"><img Src="buttonTech.jpg" height=20 width=75></A>

<img SRC="nav.jpg" height=20 width=18>

<A HREF="locations.html"><img SRC="buttonLoc.jpg" height=20
width=75></A>

<img SRC="nav.jpg" height=20 width=18>

<A HREF="Products.html"><img SRC="buttonProd.jpg" height=20
width=75></A>

<img SRC="navend.jpg" height=20 width=18>

</DIV></TR></TD>

<TR VALIGN=Top>
<TD VALIGN=Top>

<TABLE BORDER=1 ALIGN=left CELLSPACING=0 CELLPADDING=0 WIDTH=100%>

<img src="bar.jpg" width=100% align=center>

<TD VALIGN=left WIDTH=18% height=10% BACKGROUND="links.jpg">

<H1 STYLE="HEIGHT=8pt; width=8%; Color=red;
filter:shadow(directorn=75, color-black)">
LINKS</H1>

<A HREF="links.html" TARGET="_top"><H3>HOT Links</H3></A>

<A HREF="Tips.html" TARGET="_top"><H3>Tips & Tricks</H3></A>

<A HREF="FAQ.html" TARGET="_top"><H3>Q & A's</H3></A>

<A HREF="Orderstatus.html" TARGET="_top"><H3>Order Status</H3></A>

<A HREF="Magazine.html" TARGET="_top"><H3>Our Newsletter</H3></A>


<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 WIDTH=75%>
</TR></TD>
</TABLE>


<TD>

<CENTER>
<A NAME=#Top></A>

<H1>Product Order Form</H1>

</CENTER>

<FORM NAME=frmPMPRegistration ACTION="NanoGroup.asp" METHOD=post>
Date:&nbsp;&nbsp;<INPUT TYPE="text" Name="txtDate" Value=" " ><BR>

<BR>

<H5>Personal Information:</H5>

<B>Title:</B>&nbsp;&nbsp;<SELECT NAME="optTitile">
<OPTION>Mr.
<OPTION>Mrs.
<OPTION>Miss.
</SELECT><BR><BR>

<B>Last Name:</B>&nbsp;<INPUT TYPE=text NAME=txtFirst VALUE="
">&nbsp;&nbsp&nbsp;
<B>First Name:</B>&nbsp;<INPUT TYPE=text NAME=txtLast VALUE="
"><BR><BR>
<B>Address:</B>&nbsp;&nbsp&nbsp;<INPUT TYPE=text NAME=txtAddress
VALUE=" "><BR><BR>
<B>City:</B>&nbsp;&nbsp;&nbsp;<INPUT TYPE=text NAME=txtCity VALUE="
"><BR><BR>
<B>Province:</B><SELECT NAME=optLevel>
<OPTION>British Columbia
<OPTION>Alberta
<OPTION>Saskatchewan
<OPTION>Manitoba
<OPTION>Ontario
<OPTION>Quebec
<OPTION>Nova Scotia
<OPTION>New Brunswick
<OPTION>Prince Edward Island
</SELECT><BR><BR>

<B>Postal Code:</B>&nbsp;&nbsp;<INPUT TYPE=text NAME=textPostCode
VALUE=" "><BR><BR>
<B>Telephone:</B>&nbsp;&nbsp<INPUT TYPE=text NAME=textPhone VALUE="
"><BR><BR>
<B>EMail Address:</B>&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE=text
NAME=textEmail VALUE=" "><BR><BR>


<center>
<H5>
Please fill in all required fields, so that we may better serve you:
</center></H5>

<HR>
<center>
<H4>Product Sales - ORDER section</H4></center>

<B>Category:</B>&nbsp; <SELECT NAME="optCategory">
<OPTION>System - Dell Desktop Computers
<OPTION>Laptop Computer
<OPTION>Printer
<OPTION>Computer Accessories
</SELECT><BR><BR>

<B>Which product are you ordering?</B><SELECT NAME="optProduct">
<OPTION>System - Dell Desktop Computers
<OPTION>Laptop Computer
<OPTION>Printer
<OPTION>Mice
<OPTION>CD Drive
<OPTION>Hub
<OPTION>NIC Card
</SELECT>
<i>If you would like to order more than one item, please fill
in the section at the bottom of this form</i>

<BR>
<BR>

<B>Do you subscribe to our Monthly Newsletter?<BR></B>
<INPUT TYPE=checkbox NAME=chkYes VALUE=Yes>Yes
<INPUT TYPE=checkbox NAME=chkNo VALUE=No>No<BR><BR>
<B>If not, would you like to?</B><BR>
Please <A HREF="Magazine.html"><i>click here</i></A> to be
re-directed to our newsletter form
<BR>
<BR>

<B>Which Nano Group Computer Sales & Support location(s) do you shop
at most often?<BR></B>
<SELECT NAME=optLocation>
<OPTION>Aylmer
<OPTION>Calgary
<OPTION>Edmonton
<OPTION>Fredericton
<OPTION>Halifax
<OPTION>Kingston
<OPTION>London
<OPTION>Moncton
<OPTION>Montreal
<OPTION>Ottawa
<OPTION>Regina
<OPTION>Toronto
<OPTION>Victoria
<OPTION>Winnipeg
</SELECT><BR><BR>

<SCRIPT LANGUAGE="VBscript">

Sub optLocation_OnChange
Dim x
Dim y
x=Document.frmPMPregistration.optLocation.SelectedIndex
for y=0 to Document.frmPMPregistration.optLocation.Length-1
if y=x then
Alert "Thank you for shopping in our" +
Document.frmPMPregistration.optLocation.Options(x).Text+
"Location"
end if
Next
End Sub

</SCRIPT>
<BR><center>
<H4>Payment Option:</H4></center>
We accept <img src="mastercard.gif">only &nbsp; &nbsp<INPUT TYPE=radio
NAME=rdoCard VALUE=Card>Master Card &nbsp; &nbsp
<INPUT TYPE=radio NAME=rdoVisa VALUE=Visa>Visa
<BR>
<BR>

Please enter any additional comments, suggestions or feedback that
would
help us continue providing the best service to you.<BR>
<center><TEXTAREA NAME=comments ROWS=10 COLS=60>
</TEXTAREA></center>

<HR>
<CENTER>
<INPUT TYPE=submit NAME=cmdSubmit VALUE=Submit>
<INPUT TYPE=reset NAME=cmdReset VALUE=Reset Form>
</FORM>

<SCRIPT LANGUAGE=vbscript>document.frmPMPRegistration.txtDate.Value=Now
</SCRIPT>


<A HREF="Products.html">[Back to Product Sales]</A>

</BODY>
</HTML>

ORDERS.inc file

CODE
<HTML>

<TITLE>Order.inc for Nano Group Computer Sales & Support Project -
WPF </TITLE>
<HEAD>

</HEAD>

<BODY>

<%

Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DSN=Nano"

%>

</BODY>
</HTML>

NanoGroup.asp

CODE
<HTML>
<!-- #INCLUDE FILE="ADOVBS.inc" -->
<!-- #INCLUDE FILE="order.inc" -->
<HEAD>

<TITLE>NanoGroup.asp - From ORDER FORM Order.html- Nano Group Computer
Sales & Support. Using ASP page - Adding a new record to Access
database</TITLE>


<LINK REL=STYLESHEET TYPE="text/css" HREF="main.css">


</HEAD>

<BODY>


<H1> Nano Group Computer Sales & Support</H1>

<H3> Thank you for purchasing our Products, you will receive your
shipment within 2-4 business days! </H3>

<%

Dim strCategory,strProduct,strFirst,strLast,strAddress,strCity,strProvince,strPostalCode,strTelephone,strEmail

strTitle = Request.Form("optTitle")
strCategory = Request.Form("optCategory")
strProduct = Request.Form("optProduct")
strFirst = Request.Form("txtFirst")
strLast = Request.Form("txtLast")
strAddress = Request.Form("txtAddress")
strCity = Request.Form("txtCity")
strProvince = Request.Form("txtProvince")
strPostalCode = Request.Form("txtPostalCode")
strTelephone = Request.Form("txtPhone")
strEmail = Request.Form("txtEmail")
%>

<%
Dim objrsUsers
Set objrsUsers = Server.CreateObject("ADODB.Recordset")


objrsUsers.Open "Orders", strConn,adOpenForwardOnly,adCmdTable

objrsUsers.Filter = "Email= '" & Request.Form("txtEmail") & "'"
If objrsUsers.EOF then 'Create New Record
objrsUsers.AddNew

End If

objrsUsers("Title") = strTitle 'populate a new record or
modify current one
objrsUsers("Category") = strCategory
objrsUsers("Product") = strProduct
objrsUsers("LastName") = strLast
objrsUsers("FirstName") = strFirst
objrsUsers("Address") = strAddress
objrsUsers("City") = strCity
objrsUsers("Province") = strProvince
objrsUsers("PostalCode") = strPostalCode
objrsUsers("Telephone") = strTelephone
objrsUsers("Email") = strEmail

objrsUsers.Update

objrsUsers.Close
objrsUsers=Nothing
objConn.Close
objConn.Nothing

%>

<BR>

<HR>

Welcome, <% Response.Write strFirst %> &nbsp; <% Response.Write
strLast %>

<BR>

You product(s) have been ordered, and your information has been
updated in our database.

<BR>

<% Response.Write strCategory %> &nbsp;
<% Response.Write strProduct %> &nbsp;
<% Response.Write strFname %> &nbsp;
<% Response.Write strLast %> <BR>
<% Response.Write strAddress %> <BR>
<% Response.Write strCity %> <BR>
<% Response.Write strProvince %> <BR>
<% Response.Write strPostalCode %> <BR>
<% Response.Write strTelephone %> <BR>
<% Response.Write strEmail %> <BR>

<%End If%>

<% Response.Redirect "Order.html" %>

</BODY>
</HTML>

NOTE: File not attached is access database. Table under "Orders" and
field name - Category, Products, First Name, Last Name, Address, City,
Province, Postal Code, Telephone and E-Mail.

Can any one help? Thank you

Re: ASP link back to Access database by Martin

Martin
Mon Jun 21 18:17:46 CDT 2004

hi,

your code is quite complex, a bit hard to read.
is there and error message on the server event log, website logfile ?
i gave up read all the files, they are too big, sorry.


"TrvlOrm" <ksorman@shaw.ca> a écrit dans le message de
news:fa9bacd0.0406211329.45602b10@posting.google.com...
> I need some answers please....
>
> I am using Active Server Pages and have three files. The main file
> Orders.html is a order form for a computer company. When the user
> inputs his information in the required fields and pushes submit the
> information is then looped back to Notify.asp for messages that
> appear, and then all the information is then submitted back to a
> Microsoft Access database.
>
> But it will not submit information to the access database. Could
> someone please advise to what I am doing incorrectly? I believe the
> error is in the asp page, but not sure what I need to do to correct
> it.
>
> PLEASE HELP. Any help much appreaciated. This is a URGENT request to.
>
> Here is my coding:
> ORDERS.html file
>
> CODE
> <HTML>
>
> <HEAD>
>
> <TITLE>Nano Group Computer Sales & Support - Order Form</TITLE>
>
>
> <LINK REL=STYLESHEET TYPE="text/css" HREF="main.css">
>
>
> <SCRIPT language="vbscript">
> Window.Status = "Don't forget to order. Your product will be shipped
> within 2-4 business days!"
> </SCRIPT>
>
> </HEAD>
>
>
> <TR VALIGN="Top">
> <TD VALIGN="Top">
>
>
> <CENTER>
> <img SRC="logo.gif" height=103 width=985 align=Top>
> </CENTER>
>
> <DIV align=right>
> <img SRC="navfront.jpg" height=20 width=18>
> <A HREF="home.html"><img SRC="buttonHome.jpg" height=20 width=75></A>
>
> <img src="nav.jpg" height=20 width=18>
>
> <A HREF="trainframe.html"><img SRC="buttontraing.jpg" height=20
> width=75></A>
>
> <img SRC="nav.jpg" height=20 width=18>
>
> <A HREF="tech.html"><img Src="buttonTech.jpg" height=20 width=75></A>
>
> <img SRC="nav.jpg" height=20 width=18>
>
> <A HREF="locations.html"><img SRC="buttonLoc.jpg" height=20
> width=75></A>
>
> <img SRC="nav.jpg" height=20 width=18>
>
> <A HREF="Products.html"><img SRC="buttonProd.jpg" height=20
> width=75></A>
>
> <img SRC="navend.jpg" height=20 width=18>
>
> </DIV></TR></TD>
>
> <TR VALIGN=Top>
> <TD VALIGN=Top>
>
> <TABLE BORDER=1 ALIGN=left CELLSPACING=0 CELLPADDING=0 WIDTH=100%>
>
> <img src="bar.jpg" width=100% align=center>
>
> <TD VALIGN=left WIDTH=18% height=10% BACKGROUND="links.jpg">
>
> <H1 STYLE="HEIGHT=8pt; width=8%; Color=red;
> filter:shadow(directorn=75, color-black)">
> LINKS</H1>
>
> <A HREF="links.html" TARGET="_top"><H3>HOT Links</H3></A>
>
> <A HREF="Tips.html" TARGET="_top"><H3>Tips & Tricks</H3></A>
>
> <A HREF="FAQ.html" TARGET="_top"><H3>Q & A's</H3></A>
>
> <A HREF="Orderstatus.html" TARGET="_top"><H3>Order Status</H3></A>
>
> <A HREF="Magazine.html" TARGET="_top"><H3>Our Newsletter</H3></A>
>
>
> <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 WIDTH=75%>
> </TR></TD>
> </TABLE>
>
>
> <TD>
>
> <CENTER>
> <A NAME=#Top></A>
>
> <H1>Product Order Form</H1>
>
> </CENTER>
>
> <FORM NAME=frmPMPRegistration ACTION="NanoGroup.asp" METHOD=post>
> Date:&nbsp;&nbsp;<INPUT TYPE="text" Name="txtDate" Value=" " ><BR>
>
> <BR>
>
> <H5>Personal Information:</H5>
>
> <B>Title:</B>&nbsp;&nbsp;<SELECT NAME="optTitile">
> <OPTION>Mr.
> <OPTION>Mrs.
> <OPTION>Miss.
> </SELECT><BR><BR>
>
> <B>Last Name:</B>&nbsp;<INPUT TYPE=text NAME=txtFirst VALUE="
> ">&nbsp;&nbsp&nbsp;
> <B>First Name:</B>&nbsp;<INPUT TYPE=text NAME=txtLast VALUE="
> "><BR><BR>
> <B>Address:</B>&nbsp;&nbsp&nbsp;<INPUT TYPE=text NAME=txtAddress
> VALUE=" "><BR><BR>
> <B>City:</B>&nbsp;&nbsp;&nbsp;<INPUT TYPE=text NAME=txtCity VALUE="
> "><BR><BR>
> <B>Province:</B><SELECT NAME=optLevel>
> <OPTION>British Columbia
> <OPTION>Alberta
> <OPTION>Saskatchewan
> <OPTION>Manitoba
> <OPTION>Ontario
> <OPTION>Quebec
> <OPTION>Nova Scotia
> <OPTION>New Brunswick
> <OPTION>Prince Edward Island
> </SELECT><BR><BR>
>
> <B>Postal Code:</B>&nbsp;&nbsp;<INPUT TYPE=text NAME=textPostCode
> VALUE=" "><BR><BR>
> <B>Telephone:</B>&nbsp;&nbsp<INPUT TYPE=text NAME=textPhone VALUE="
> "><BR><BR>
> <B>EMail Address:</B>&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE=text
> NAME=textEmail VALUE=" "><BR><BR>
>
>
> <center>
> <H5>
> Please fill in all required fields, so that we may better serve you:
> </center></H5>
>
> <HR>
> <center>
> <H4>Product Sales - ORDER section</H4></center>
>
> <B>Category:</B>&nbsp; <SELECT NAME="optCategory">
> <OPTION>System - Dell Desktop Computers
> <OPTION>Laptop Computer
> <OPTION>Printer
> <OPTION>Computer Accessories
> </SELECT><BR><BR>
>
> <B>Which product are you ordering?</B><SELECT NAME="optProduct">
> <OPTION>System - Dell Desktop Computers
> <OPTION>Laptop Computer
> <OPTION>Printer
> <OPTION>Mice
> <OPTION>CD Drive
> <OPTION>Hub
> <OPTION>NIC Card
> </SELECT>
> <i>If you would like to order more than one item, please fill
> in the section at the bottom of this form</i>
>
> <BR>
> <BR>
>
> <B>Do you subscribe to our Monthly Newsletter?<BR></B>
> <INPUT TYPE=checkbox NAME=chkYes VALUE=Yes>Yes
> <INPUT TYPE=checkbox NAME=chkNo VALUE=No>No<BR><BR>
> <B>If not, would you like to?</B><BR>
> Please <A HREF="Magazine.html"><i>click here</i></A> to be
> re-directed to our newsletter form
> <BR>
> <BR>
>
> <B>Which Nano Group Computer Sales & Support location(s) do you shop
> at most often?<BR></B>
> <SELECT NAME=optLocation>
> <OPTION>Aylmer
> <OPTION>Calgary
> <OPTION>Edmonton
> <OPTION>Fredericton
> <OPTION>Halifax
> <OPTION>Kingston
> <OPTION>London
> <OPTION>Moncton
> <OPTION>Montreal
> <OPTION>Ottawa
> <OPTION>Regina
> <OPTION>Toronto
> <OPTION>Victoria
> <OPTION>Winnipeg
> </SELECT><BR><BR>
>
> <SCRIPT LANGUAGE="VBscript">
>
> Sub optLocation_OnChange
> Dim x
> Dim y
> x=Document.frmPMPregistration.optLocation.SelectedIndex
> for y=0 to Document.frmPMPregistration.optLocation.Length-1
> if y=x then
> Alert "Thank you for shopping in our" +
> Document.frmPMPregistration.optLocation.Options(x).Text+
> "Location"
> end if
> Next
> End Sub
>
> </SCRIPT>
> <BR><center>
> <H4>Payment Option:</H4></center>
> We accept <img src="mastercard.gif">only &nbsp; &nbsp<INPUT TYPE=radio
> NAME=rdoCard VALUE=Card>Master Card &nbsp; &nbsp
> <INPUT TYPE=radio NAME=rdoVisa VALUE=Visa>Visa
> <BR>
> <BR>
>
> Please enter any additional comments, suggestions or feedback that
> would
> help us continue providing the best service to you.<BR>
> <center><TEXTAREA NAME=comments ROWS=10 COLS=60>
> </TEXTAREA></center>
>
> <HR>
> <CENTER>
> <INPUT TYPE=submit NAME=cmdSubmit VALUE=Submit>
> <INPUT TYPE=reset NAME=cmdReset VALUE=Reset Form>
> </FORM>
>
> <SCRIPT LANGUAGE=vbscript>document.frmPMPRegistration.txtDate.Value=Now
> </SCRIPT>
>
>
> <A HREF="Products.html">[Back to Product Sales]</A>
>
> </BODY>
> </HTML>
>
> ORDERS.inc file
>
> CODE
> <HTML>
>
> <TITLE>Order.inc for Nano Group Computer Sales & Support Project -
> WPF </TITLE>
> <HEAD>
>
> </HEAD>
>
> <BODY>
>
> <%
>
> Dim objConn
> Set objConn = Server.CreateObject("ADODB.Connection")
> objConn.Open "DSN=Nano"
>
> %>
>
> </BODY>
> </HTML>
>
> NanoGroup.asp
>
> CODE
> <HTML>
> <!-- #INCLUDE FILE="ADOVBS.inc" -->
> <!-- #INCLUDE FILE="order.inc" -->
> <HEAD>
>
> <TITLE>NanoGroup.asp - From ORDER FORM Order.html- Nano Group Computer
> Sales & Support. Using ASP page - Adding a new record to Access
> database</TITLE>
>
>
> <LINK REL=STYLESHEET TYPE="text/css" HREF="main.css">
>
>
> </HEAD>
>
> <BODY>
>
>
> <H1> Nano Group Computer Sales & Support</H1>
>
> <H3> Thank you for purchasing our Products, you will receive your
> shipment within 2-4 business days! </H3>
>
> <%
>
> Dim
strCategory,strProduct,strFirst,strLast,strAddress,strCity,strProvince,strPo
stalCode,strTelephone,strEmail
>
> strTitle = Request.Form("optTitle")
> strCategory = Request.Form("optCategory")
> strProduct = Request.Form("optProduct")
> strFirst = Request.Form("txtFirst")
> strLast = Request.Form("txtLast")
> strAddress = Request.Form("txtAddress")
> strCity = Request.Form("txtCity")
> strProvince = Request.Form("txtProvince")
> strPostalCode = Request.Form("txtPostalCode")
> strTelephone = Request.Form("txtPhone")
> strEmail = Request.Form("txtEmail")
> %>
>
> <%
> Dim objrsUsers
> Set objrsUsers = Server.CreateObject("ADODB.Recordset")
>
>
> objrsUsers.Open "Orders", strConn,adOpenForwardOnly,adCmdTable
>
> objrsUsers.Filter = "Email= '" & Request.Form("txtEmail") & "'"
> If objrsUsers.EOF then 'Create New Record
> objrsUsers.AddNew
>
> End If
>
> objrsUsers("Title") = strTitle 'populate a new record or
> modify current one
> objrsUsers("Category") = strCategory
> objrsUsers("Product") = strProduct
> objrsUsers("LastName") = strLast
> objrsUsers("FirstName") = strFirst
> objrsUsers("Address") = strAddress
> objrsUsers("City") = strCity
> objrsUsers("Province") = strProvince
> objrsUsers("PostalCode") = strPostalCode
> objrsUsers("Telephone") = strTelephone
> objrsUsers("Email") = strEmail
>
> objrsUsers.Update
>
> objrsUsers.Close
> objrsUsers=Nothing
> objConn.Close
> objConn.Nothing
>
> %>
>
> <BR>
>
> <HR>
>
> Welcome, <% Response.Write strFirst %> &nbsp; <% Response.Write
> strLast %>
>
> <BR>
>
> You product(s) have been ordered, and your information has been
> updated in our database.
>
> <BR>
>
> <% Response.Write strCategory %> &nbsp;
> <% Response.Write strProduct %> &nbsp;
> <% Response.Write strFname %> &nbsp;
> <% Response.Write strLast %> <BR>
> <% Response.Write strAddress %> <BR>
> <% Response.Write strCity %> <BR>
> <% Response.Write strProvince %> <BR>
> <% Response.Write strPostalCode %> <BR>
> <% Response.Write strTelephone %> <BR>
> <% Response.Write strEmail %> <BR>
>
> <%End If%>
>
> <% Response.Redirect "Order.html" %>
>
> </BODY>
> </HTML>
>
> NOTE: File not attached is access database. Table under "Orders" and
> field name - Category, Products, First Name, Last Name, Address, City,
> Province, Postal Code, Telephone and E-Mail.
>
> Can any one help? Thank you