I am trying to update (save) the contents of radio buttons to an access database table.
For this I use this w3-e example Link
I linked a SQL update query to it.
In the w3 example response.write & cars & displays the content (e.g. Saab), but & cars & fails in the database => get this error message
Your favorite car is: Saab
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
Thanks for tips on how to fix this.
For this I use this w3-e example Link
I linked a SQL update query to it.
Code:
...
<input type="submit" value="Submit" />
</form>
<%
if cars<>"" then
Response.Write("<p>Your favorite car is: " & cars & "</p>")
end if
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database.mdb")
Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "UPDATE Form99 "&_
"SET D_A ="&cars&", D_B ="&cars&", D_C ="&cars&", "&_
"S_A ="&cars&", S_B="&cars&", S_C="&cars&", DT = now() WHERE no=99"
rs.Open SQL, Conn
%>
In the w3 example response.write & cars & displays the content (e.g. Saab), but & cars & fails in the database => get this error message
Your favorite car is: Saab
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
Thanks for tips on how to fix this.