Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Update Problem

  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    Bunbury W.A
    Posts
    157
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update Problem

    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

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Location
    Bunbury W.A
    Posts
    157
    Thanks
    0
    Thanked 0 Times in 0 Posts

    got it

    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •