Checkbox update record

Posted on 2006-03-28
Last Modified: 2012-08-14
Is it possible to have a master page with a checkbox, that can update a record if selected?
Question by:vonfranzken
    LVL 70

    Expert Comment

    by:Jason C. Levine
    Hi vonfranzken,

    Yes, it is possible.

    Could you post a little more detail about what you are trying to do and which server model you're doing it with?

    Author Comment

    Sure in fact here is a copy of the error I get when I try to it says.

    Error Type:
    ADODB.Field (0x800A0BCD)
    Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
    /musicforall/newsroom/news_master.asp, line 267

    Line 267 is this:
    <input type="hidden" name="MM_recordId" value="<%= Recordset1.Fields.Item("id").Value %>">

    This is put in when I apply the update record to the checkbox via the master list.


    Author Comment

    Im sorry asp
    LVL 70

    Expert Comment

    by:Jason C. Levine
    It sounds like the Primary key value is not set in the form.  DW's update behavior requires the unique ID number of the record to be updated to be present in the form.  How are you setting that?

    Author Comment

    Well Im not Im just listing from lets say recordset1 a master list of records which resides in form1 with an added checkbox
    I then applied an update behavior to the checkbox, and used the same recordset which lists them.
    I then have a javascript submit form behavior applied to the checbox to submit the update in the event it is checked or un-checked.

    I think its having a hard time distinguishing which record to update via the master list.

    LVL 70

    Accepted Solution


    Right.  You are misusing the update record behavior.  The built-in behavior requires one primary key per form in order to work correctly.

    If you output a bunch of records in a repeat region and stick that region inside of a form, you can't use the update record behavior.

    What you can do is put the form tags INSIDE the repeat region (in a table cell, say) and your method should work.  It may require you to do a little hand coding, though.

    The other way to do this with only one form is to have all values submit as an array and then hand code the update behavior so that it steps through the array and runs the sql update for each record in the array.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Suggested Solutions

    For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
    Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video discusses moving either the default database or any database to a new volume.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now