mindytruitt
07-09-2004, 08:51 PM
I am trying to have a from submit and date entered into the table Chargability, but it is coming up with the error ODBC Error Code = 21S01 (Insert value list does not match column list) but I dont see anything wrong with my code or database.
CHARGEABILITY DATABASE:
ID - AutoNumber
Employee - Number
Week - Number
ChargeHours - Text
InternalHours - Text
VacationHours - Text
NassignHours - Text
AvailableHours - Text
BudgetCharge - Number
FiscalYear - Number
FORM PAGE:
<form name=AllEditWeek action=chargeabilityreportsubmit3.cfm method=post>
<cfoutput group="UserName">
<input type="hidden" name="Employee" value="#Charge.UserID#">
<input type="hidden" name="Week" value="#Week#">
<input type="hidden" name="FiscalYear" value="2004">
<input type="hidden" name="BudgetCharge" value="25">
<tr>
<td width="120" bordercolor="blue"><font size="1"><b>#Charge.fullname#</b></font></td>
<td width="75" Align="Center"><input type="text" name="ChargeHours" size=3 ></font></td>
<td width="75" Align="Center"><input type="text" name="InternalHours" size=3></font></td>
<td width="75" Align="center"><input type="text" name="VacationHours" size=3></font></td>
<td width="75" Align="Center"><input type="text" name="NassignHours" size=3></font></td>
<td width="75" Align="Center"><input type="text" name="AvailableHours" size=3></font></td>
<td width="75" Align="center"> % </font></td>
<td width="50"><input type="submit" name="Submit" value="OK"> </td>
</tr>
</cfoutput>
</form>
SUBMIT PAGE:
<CFQUERY NAME="AddOrder" DATASOURCE="literature">
INSERT INTO Chargeability (Employee, Week, ChargeHours, InternalHours, VacationHours, NassignHours, AvailableHours, FiscalYear, BudgetCharge)
VALUES(#Form.Employee#, #Week#, #ChargeHours#, #InternalHours#, '#vacationHours#', '#NassignHours#', '#AvailableHours#', #FiscalYear#, #BudgetCharge#)
</CFQUERY>
CHARGEABILITY DATABASE:
ID - AutoNumber
Employee - Number
Week - Number
ChargeHours - Text
InternalHours - Text
VacationHours - Text
NassignHours - Text
AvailableHours - Text
BudgetCharge - Number
FiscalYear - Number
FORM PAGE:
<form name=AllEditWeek action=chargeabilityreportsubmit3.cfm method=post>
<cfoutput group="UserName">
<input type="hidden" name="Employee" value="#Charge.UserID#">
<input type="hidden" name="Week" value="#Week#">
<input type="hidden" name="FiscalYear" value="2004">
<input type="hidden" name="BudgetCharge" value="25">
<tr>
<td width="120" bordercolor="blue"><font size="1"><b>#Charge.fullname#</b></font></td>
<td width="75" Align="Center"><input type="text" name="ChargeHours" size=3 ></font></td>
<td width="75" Align="Center"><input type="text" name="InternalHours" size=3></font></td>
<td width="75" Align="center"><input type="text" name="VacationHours" size=3></font></td>
<td width="75" Align="Center"><input type="text" name="NassignHours" size=3></font></td>
<td width="75" Align="Center"><input type="text" name="AvailableHours" size=3></font></td>
<td width="75" Align="center"> % </font></td>
<td width="50"><input type="submit" name="Submit" value="OK"> </td>
</tr>
</cfoutput>
</form>
SUBMIT PAGE:
<CFQUERY NAME="AddOrder" DATASOURCE="literature">
INSERT INTO Chargeability (Employee, Week, ChargeHours, InternalHours, VacationHours, NassignHours, AvailableHours, FiscalYear, BudgetCharge)
VALUES(#Form.Employee#, #Week#, #ChargeHours#, #InternalHours#, '#vacationHours#', '#NassignHours#', '#AvailableHours#', #FiscalYear#, #BudgetCharge#)
</CFQUERY>



