...

View Full Version : Update Problem



dawilis
12-12-2003, 02:07 AM
Can anyone see why this update statment is failing
this is the error
>Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
>[Microsoft][ODBC Microsoft Access Driver] Too few parameters. >Expected 1.
>/wic/stats/workshop/edit_workshop.asp, line 24

this is the edit_workshop.asp page
<!-- #include File="../../common.asp"-->
<%
Condate=request.form("Condate")
txtname=request.form("Name")
txtHissue=request.form("healthissue2")
numPolicy=request.form("healthtype2")
txtnotes =request.form("Notes2")
txtculture = request.form("cultural2")
txtzip = request.form("postcode2")
txtnumbers = request.form("Attendees2")
Condate_ = Addyear(Condate)
Wmonth = GetMonth(Condate_)
response.write Condate &"<br>"
id = CStr(Request.querystring("id"))
Set MyConn=Server.CreateObject("ADODB.Connection")
'*** Select Connection Method ***
MyConn.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" & Server.MapPath(level&"../../db/wic.mdb") & ";"

sql = "Update workshop set Name = '"&txtname&"' where [id] ="&id&""
response.write sql
'response.end
MyConn.Execute(SQL)
MyConn.Close
Set MyConn = Nothing
response.redirect "../workshop.asp?mode=Display1&LMonths=1 "
%>

this is what the sql output looks like
> Update workshop set Name = ' e' where [id] =33

dawilis
12-12-2003, 02:25 AM
I turned around for another look and bang saw the problem
I think I was trying to hard
obviouse mistake on my part didnt call the id correctly



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum