|
I've created an admin function to handle a "picture of the week" off our index, and im trying to update the db with the inputted data: weekStart, weekEnd, sourceFile. The name of the database is dB.mdb and is in the same folder as the file. The name of the table is pow and has the following columns: id (number, indexed with no duplicates), weekStart (text), weekEnd (text), sourceFile (text).
The code below is after the form had been submitted...i cross checked the values in the form to the variables in the function, it all matches. the getid function just querys the database, returns records, and adds one. With the code below i get the following error:
Microsoft JET Database Engineerror '80040e10'
No value given for one or more required parameters.
/pow/pow.asp, line 18
view code:
if request.querystring("action") = "process" then
w_start = request.form("month") & "/" & request.form("day") & "/" & request.form("year")
w_end = request.form("month2") & "/" & request.form("day2") & "/" & request.form("year2")
id = getid()
SQL="insert into pow (id,weekStart,weekEnd,sourceFile) VALUES (" & id & "," & w_start & "," & w_end & "," & request.form("source") & ")"
sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & server.mappath("dB.mdb")
Set connection = Server.CreateObject("ADODB.Connection")
connection.Open(sConnString)
connection.execute(SQL)
Connection.Close
Set Connection = Nothing
end if
###
Any help would be greatly appreciated.
Thanks in advance
|