Hi, I'm trying to add a record into a database using and SQL INSERT statement and I'm receiving the following error:
No value given for one or more required parameters.
the abridged code for the statement is as follows:
Dim strconn
Dim conn
strconn="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
strconn=strconn & server.mappath("../database/server.mdb"
& ";"
set conn = Server.CreateObject("ADODB.Connection"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
conn.open strconn
insertRec = "INSERT INTO booking (showingID, card_number, date_booked, number_adult_seats, number_concession_seats, seat_type, payment_amount) VALUES (CLng(showingID), cardNo, dateBooked, noASeat, noCSeat, seatType, price)"
conn.Execute(insertRec)
conn.close
strconn = Nothing
The error points to the conn.Execute(insertRec) statement. I've checked the SQL and it seems to be in order and all the fields to be input are present and seem to have the correct data types. Basically I'm stumped. Can anyone help?
Thank you in advance,
Ben.
No value given for one or more required parameters.
the abridged code for the statement is as follows:
Dim strconn
Dim conn
strconn="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
strconn=strconn & server.mappath("../database/server.mdb"
set conn = Server.CreateObject("ADODB.Connection"
conn.open strconn
insertRec = "INSERT INTO booking (showingID, card_number, date_booked, number_adult_seats, number_concession_seats, seat_type, payment_amount) VALUES (CLng(showingID), cardNo, dateBooked, noASeat, noCSeat, seatType, price)"
conn.Execute(insertRec)
conn.close
strconn = Nothing
The error points to the conn.Execute(insertRec) statement. I've checked the SQL and it seems to be in order and all the fields to be input are present and seem to have the correct data types. Basically I'm stumped. Can anyone help?
Thank you in advance,
Ben.