asp_databases thread: ASP page does not put data into Sql table (no errors returned) Help?
I have an Asp form (code below) that does not enter the data into the SQL
table. No error is given but when you goto look at the data supposed to
be entered through the form there is nothing. I am not sure how to
resolve this, is there something I can set in SQL that will recognize the
drop down selected. Is the drop down menu even the problem? I am new to
all of this so I am at a complete loss. Any help is appreciated.
Code:
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>PRELIMINARY QUESTIONNAIRE</title>
<LINK REL="stylesheet" TYPE="text/css" HREF="style.css">
</head>
<%
Dim DataConnection, cmdDC, RecordSet
Dim RecordToEdit, Updated
Set DataConnection = Server.CreateObject("ADODB.Connection")
DataConnection.Open "DSN=Northwind;uid=sa;pwd=plastic"
Set cmdDC = Server.CreateObject("ADODB.Command")
cmdDC.ActiveConnection = DataConnection
SQL = "SELECT * FROM Project_Questionnaire"
cmdDC.CommandText = SQL
Set RecordSet = Server.CreateObject("ADODB.Recordset")
RecordSet.Open cmdDC, , 0, 2
If Request.Form("B1") = "Submit" Then
RecordSet.AddNew
RecordSet.Fields("Current_Standards") = Request.Form
("txtCurrent_Standards")
RecordSet.Fields("Customer") = Request.Form("txtCustomer")
RecordSet.Fields("Project_Leader") = Request.Form
("txtProject_Leader")
RecordSet.Fields("Team_Members") = Request.Form("txtTeam_Members")
RecordSet.Fields("Assigned_Engineer") = Request.Form
("txtAssigned_Engineer")
RecordSet.Fields("Bus_Phone") = Request.Form("txtBus_Phone")
RecordSet.Fields("Home_Phone") = Request.Form("txtHome_Phone")
RecordSet.Fields("Downtime") = Request.Form("txtDowntime")
RecordSet.Fields("Handover_Conditions") = Request.Form
("txtHandover_Conditions")
RecordSet.Fields("New_Project") = Request.Form("txtNew_Project")
RecordSet.Fields("Rewiring") = Request.Form("txtRewiring")
RecordSet.Fields("VDC24_VAC120") = Request.Form("txtVDC24_VAC120")
RecordSet.Fields("Rewiring_Spec") = Request.Form
("txtRewiring_Spec")
RecordSet.Fields("Panel_Location") = Request.Form
("txtPanel_Location")
RecordSet.Fields("Interlocks_Reqd") = Request.Form
("txtInterlocks_Reqd")
RecordSet.Fields("New_Panel_Feeds") = Request.Form
("txtNew_Panel_Feeds")
RecordSet.Fields("Spare_Slots") = Request.Form("txtSpare_Slots")
RecordSet.Fields("New_Stations") = Request.Form("txtNew_Stations")
RecordSet.Fields("New_Motors") = Request.Form("txtNew_Motors")
RecordSet.Fields("Control_Method") = Request.Form
("txtControl_Method")
RecordSet.Fields("Drawing_Group") = Request.Form
("txtDrawing_Group")
RecordSet.Fields("Prod_Spec_Group ") = Request.Form
("txtProd_Spec_Group")
RecordSet.Fields("QA_Group") = Request.Form("txtQA_Group")
RecordSet.Fields("Power_Consump") = Request.Form
("txtPower_Consump")
RecordSet.Fields("Affect_Fire") = Request.Form("txtAffect_Fire")
RecordSet.Fields("Affect_Dust") = Request.Form("txtAffect_Dust")
RecordSet.Fields("Affect_Water_Air") = Request.Form
("txtAffect_Water_Air")
RecordSet.Update
Added = "True"
End If
%>
<body bgcolor="#C0C0C0" leftmargin="30">
<form action="Prelimtest1.asp" method="POST">
<% If Added = "True" Then %>
<b><%= Request.Form("txtCustomer") %></b>
<p> has been Added.<P>
<% End If %>
<h1 align="center"><font face="Arial" size="4">PRELIMINARY QUESTIONNAIRE
RE: CONTROLS REQUIREMENTS</font></h1>
<table border="0" width="100%">
<tr>
<td width="48%">
<p align="center"><font face="Arial" color="red">Before completing
the form, please
read the "Current Standards" information at this Link.
<a href="Current%20Standards.htm">Current
Standards</a></font></td>
<td width="25%"><font face="Arial">I have read and agree to
the current standards.</font></td>
<td width="27%"><select size="1" name="txtCurrent_Standards">
<option selected value="I AGREE">I AGREE</option>
<option value="I DO NOT AGREE">I DO NOT AGREE</option>
</select></td>
</tr>
</table>
<table border="0" width="636">
<tr><td width="82"><font face="Arial">Customer:</font></td>
<td width="1"><font face="Arial"><input type="text"
name="txtCustomer" size="20"></font></td>
<td width="267"><font face="Arial">Project Leader:</font></td>
<td width="285"><font face="Arial"><input type="text"
name="txtProject_Leader" size="20"></font></td>
</tr>
</table>
<table border="0" width="100%" height="87">
<tr>
<td width="16%" height="81"><font face="Arial">Team
Members:</font></td>
<td width="84%" height="81"><font face="Arial"><textarea rows="3"
name="txtTeam_Members" cols="69"></textarea></font></td>
</tr>
</table>
<table border="0" width="65%" height="63">
<tr>
<td width="14%" rowspan="2" height="57"><font face="Arial">Assigned
Control Engineer:</font></td>
<td width="20%" height="51" rowspan="2"><font face="Arial"><input
type="text" name="txtAssigned_Engineer" size="20"></font></td>
<td width="15%" height="26"><font face="Arial">Business
Phone:</font></td>
<td width="51%" height="26"><font face="Arial"><input type="text"
name="txtBus_Phone" size="20"></font></td>
</tr>
<tr>
<td width="15%" height="25"><font face="Arial">Home
Phone:</font></td>
<td width="51%" height="25"><font face="Arial"><input type="text"
name="txtHome_Phone" size="20"></font></td>
</tr>
</table>
<h2><font face="Arial">Project Highlights</font></h2>
<p><font face="Arial">Note: training to be arranged by customer- Outside
of
Project's scope.</font></p>
<table border="0" width="100%">
<tr>
<td width="19%"><font face="Arial">Acceptable Downtime<br>
(e.g. 4 hours/year)</font></td>
<td width="81%"><font face="Arial"><input type="text"
name="txtDowntime" size="20"></font></td>
</tr>
</table>
<p><b><font face="Arial">Conditions for project Handover to customer
(Please
be specific)</font></b></p>
<ol>
<li>
<p class="MsoNormal"><span style="mso-bidi-font-weight:bold"><font
face="Arial">Equipment
shall run 20 hours without defect (all faults electrical or control
shall reset the clock</font></span></li>
<li>
<p class="MsoNormal"><span style="mso-bidi-font-size: 10.0pt; font-
family: Times New Roman; mso-fareast-font-family: Times New Roman; mso-
ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-
SA; mso-bidi-font-weight: bold"><font face="Arial">As
built drawings and full documentation shall be
provided</font></span></li>
<li>
<p class="MsoNormal"><span style="mso-bidi-font-size: 10.0pt; font-
family: Times New Roman; mso-fareast-font-family: Times New Roman; mso-
ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-
SA; mso-bidi-font-weight: bold"><font face="Arial">All
safety devices checked and verified by customer</font></span></li>
<li>
<p class="MsoNormal"><span style="mso-bidi-font-size: 10.0pt; font-
family: Times New Roman; mso-fareast-font-family: Times New Roman; mso-
ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-
SA; mso-bidi-font-weight: bold"><font face="Arial">All
projects quality and production requirements to be verified by
customer</font></span></li>
</ol>
<p> </p>
<p><font face="Arial"><textarea rows="3" name="txtHandover_Conditions"
cols="72"></textarea></font></p>
<table border="0" width="100%">
<tr>
<td width="25%" rowspan="2"><font face="Arial">Is this a new project
or an
addition to an existing line:</font></td>
<td width="12%" rowspan="2"><input type="text" name="txtNew_Project"
size="20"></td>
<td width="22%" rowspan="2"><font face="Arial">Will existing
equipment
require rewiring? If "yes", fill in the details
below. </font></td>
<td width="13%" rowspan="2"><select size="1" name="txtRewiring">
<option selected value="YES">YES</option>
<option value="NO">NO</option>
</select></td>
<td width="7%"><font face="Arial">24 V</font></td>
<td width="14%" rowspan="2"><select size="1" name="txtVDC24_VAC120">
<option selected value="24">24</option>
<option value="120">120</option>
</select></td>
</tr>
<tr>
<td width="7%"><font face="Arial">120 V</font></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="22%"><font face="Arial">Rewiring Requirements:</font></td>
<td width="78%"><font face="Arial"><textarea rows="2"
name="txtRewiring_Spec" cols="66"></textarea></font></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="22%"><font face="Arial">Panel Locations and number of
panels
both starter and controls. Panel Designations.</font></td>
<td width="78%"><font face="Arial"><textarea rows="2"
name="txtPanel_Location" cols="66"></textarea></font></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="26%" rowspan="2"><font face="Arial">Are any
software/hardware
interlocks required between plants or different lines?</font></td>
<td width="10%" rowspan="2"><select size="1"
name="txtInterlocks_Reqd">
<option selected value="YES">YES</option>
<option value="NO">NO</option>
</select></td>
<td width="35%"><font face="Arial">Where will new Panels be fed from?
</font></td>
<td width="29%"><font face="Arial"><input type="text"
name="txtNew_Panel_Feeds" size="32"></font></td>
</tr>
<tr>
<td width="35%"><font face="Arial">Are there spare slots in
the distribution panel?</font></td>
<td width="29%"><select size="1" name="txtSpare_Slots">
<option selected value="YES">YES</option>
<option value="NO">NO</option>
</select></td>
</tr>
</table>
<table border="0" width="108%">
<tr>
<td width="66%"><font face="Arial">Type and Location of new Scada,
PPI or
Business Stations</font></td>
<td width="43%"><font face="Arial"><input type="text"
name="txtNew_Stations" size="32"></font></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="29%"><font face="Arial">Number of new motors, Motor
ratings,
I/O count, location and number of emergency stops, and physical
layout.</font></td>
<td width="71%"><font face="Arial"><textarea rows="3"
name="txtNew_Motors" cols="61"></textarea></font></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="29%" valign="middle"><font face="Arial">Full control
methodology, including alarm controls, timeouts, manual and
automatic
operations.</font></td>
<td width="71%"><font face="Arial"><textarea rows="3"
name="txtControl_Method" cols="61"></textarea></font></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="29%" valign="middle"><font face="Arial">Which group will
provide "As-Built" drawings?</font></td>
<td width="71%"><font face="Arial"><textarea rows="3"
name="txtDrawing_Group" cols="61"></textarea></font></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="29%" valign="middle"><font face="Arial">Who will provide
the production
specifications? (i.e. quality, product output, etc. </font></td>
<td width="71%"><font face="Arial"><textarea rows="3"
name="txtProd_Spec_Group" cols="61"></textarea></font></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="29%" valign="middle"><font face="Arial">Who will verify
final
quality and operations specifications?</font></td>
<td width="71%"><font face="Arial"><textarea rows="3"
name="txtQA_Group" cols="61"></textarea></font></td>
</tr>
</table>
<table border="0" width="99%" height="139">
<tr>
<td width="13%" rowspan="2" height="49"><font face="Arial">Total
power consumption?</font></td>
<td width="21%" rowspan="2" height="49"><font face="Arial"><input
type="text" name="txtPower_Consump" size="20"></font></td>
<td width="40%" rowspan="2" height="49"><font face="Arial">Will this
affect the
current fire protection system?</font></td>
<td width="26%" height="24"><select size="1" name="txtAffect_Fire">
<option selected value="YES">YES</option>
<option value="NO">NO</option>
</select></td>
</tr>
<tr>
<td width="26%" height="19"></td>
</tr>
<tr>
<td width="34%" rowspan="2" colspan="2" valign="top"
height="78"><font face="Arial">Thank
you for taking the time to complete the form. When you submit the
form
successfully, a verification form appears.</font></td>
<td width="40%" height="36"><font face="Arial">Will this affect the
current dust collection system?</font></td>
<td width="26%" height="36"><select size="1" name="txtAffect_Dust">
<option selected value="YES">YES</option>
<option value="NO">NO</option>
</select></td>
</tr>
<tr>
<td width="40%" height="36"><font face="Arial">Will this affect the
current water or compressed air consumption?</font></td>
<td width="26%" height="36"><select size="1"
name="txtAffect_Water_Air">
<option selected value="YES">YES</option>
<option value="NO">NO</option>
</select></td>
</tr>
</table>
<p><font face="Arial"><input type="submit" value="Submit"
name="B1"><input type="reset" value="Reset" name="B2"></font></p>
</form>
</body>
<%
RecordSet.Close
Set RecordSet = Nothing
Set cmdDC = Nothing
DataConnection.Close
Set DataConnection = Nothing
%>
</html>
Thanks
Jeff