|
Employee ID :
Customer ID :
Order Date :
Shipped Date :
Shipper ID :
Ship Name :
Ship Address :
Ship City :
Ship State/Province :
Ship ZIP/Postal Code :
Ship Country/Region :
Shipping Fee :
Taxes :
Payment Type :
Paid Date :
Notes :
Tax Rate :
Tax Status :
Status ID :
<%
Dim Employee_ID, Customer_ID, Order_Date, Shipped_Date, Shipper_ID, Ship_Name,
Ship_Address, Ship_City, Ship_State_Province, Ship_ZIP_Postal_Code, Ship_Country_Region,
Shipping_Fee, Taxes, Payment_Type, Paid_Date, Notes, Tax_Rate, Tax_Status, Status_ID
Dim sConnString, connection, sSQL
Employee_ID=Request.Form("Employee_ID")
Customer_ID=Request.Form("Customer_ID")
Order_Date=Request.Form("Order_Date")
Shipped_Date=Request.Form("Shipped_Date")
Shipper_ID=Request.Form("Shipper_ID")
Ship_Name=Request.Form("Ship_Name")
Ship_Address=Request.Form("Ship_Address")
Ship_City=Request.Form("Ship_City")
Ship_State_Province=Request.Form("Ship_State_Province")
Ship_ZIP_Postal_Code=Request.Form("Ship_ZIP_Postal_Code")
Ship_Country_Region=Request.Form("Ship_Country_Region")
Shipping_Fee=Request.Form("Shipping_Fee")
Taxes=Request.Form("Taxes")
Payment_Type=Request.Form("Payment_Type")
Paid_Date=Request.Form("Paid_Date")
Notes=Request.Form("Notes")
Tax_Rate=Request.Form("Tax_Rate")
Tax_Status=Request.Form("Tax_Status")
Status_ID=Request.Form("Status_ID")
sSQL = "INSERT INTO Orders (Employee_ID, Customer_ID, Order_Date, Shipped_Date,
Shipper_ID, Ship_Name, Ship_Address, Ship_City, Ship_State_Province,
Ship_ZIP_Postal_Code, Ship_Country_Region, Shipping_Fee, Taxes, Payment_Type, Paid_Date,
Notes, Tax_Rate, Tax_Status, Status_ID) Values (" & Employee_ID & ", " & Customer_ID & ",
#" & Order_Date & "#, #" & Shipped_Date & "#, " & Shipper_ID & ", '" & Ship_Name & "', '"
& Ship_Address & "', '" & Ship_City & "', '" & Ship_State_Province & "', '" &
Ship_ZIP_Postal_Code & "', '" & Ship_Country_Region & "', '' & Shipping_Fee & '', '' &
Taxes & '', '" & Payment_Type & "', #" & Paid_Date & "#, '" & Notes & "', '" & Tax_Rate &
"', '" & Tax_Status & "', '" & Status_ID & "')"
sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath
("/database/Examen.mdb")
Set connection = Server.CreateObject("ADODB.Connection")
connection.Open(sConnString)
connection.execute(sSQL)
response.write "The form information was inserted successfully."
connection.Close
Set connection = Nothing
%>
I have an HTML Form that request various data types and I keep getting the following error:
Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.
/ordersconnection3.asp, line 32
It's a Microsoft Access Database. Any help will be appreciated.
|
|
|
|
|
It looks like you could be passing a null value to one of your columns. I would check that out first.
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
I've tripled checked that all the Allow Zero Length field are on NO. Is there anything else I should be looking out for? Does the syntax look accordingly even for the currency field?
|
|
|
|
|
Does the sql string built above, with all the parameters, run from within the Access query builder?
|
|
|
|