Professional Web Applications Themes

Mutliple Item update not working, how? - Macromedia ColdFusion

Why won't this multiple item update? I've followed examples here online, but I must be missing a tiny detail I can't see, Can anyone shed some light on this situation? <cfif IsDefined('FORM.Submit')> <cfloop list='#form.ID_#' index='i'> <cfif structKeyExists(form,'SiteName_#i#')>#sitename#<BR > <cfquery name='UpDate' datasource='KeyWebData'> UPDATE tbl_sites SET sitenmame = '#sitename#' WHERE (SiteID = #i#) </cfquery> </cfif> </cfloop> </cfif> </CFIF> </BODY> </HTML> <CFQUERY NAME='G' DATASOURCE='KeyWebData'> select * from tbl_sites </CFQUERY> <cfform NAME='blah' ACTION='test.cfm' METHOD='POST'> <input TYPE='HIDDEN' NAME='UPDATE' VALUE='YES'> <cfoutput query='G'> <input type='text' name='SiteName_#currentRow#' VALUE='#ucase(sitename)#'> <input type='hidden' name='ID_#currentRow#' value='#SiteID#'> ON <input type='radio' name='Status_#currentRow#'><BR> </cfoutput> <br><br> <INPUT TYPE='SUBMIT' NAME='SUBMIT' VALUE='SUBMIT'> </cfform>...

  1. #1

    Default Mutliple Item update not working, how?

    Why won't this multiple item update? I've followed examples here online, but I
    must be missing a tiny detail I can't see, Can anyone shed some light on this
    situation? <cfif IsDefined('FORM.Submit')> <cfloop list='#form.ID_#'
    index='i'> <cfif structKeyExists(form,'SiteName_#i#')>#sitename#<BR > <cfquery
    name='UpDate' datasource='KeyWebData'> UPDATE tbl_sites SET sitenmame =
    '#sitename#' WHERE (SiteID = #i#) </cfquery> </cfif> </cfloop> </cfif> </CFIF>
    </BODY> </HTML> <CFQUERY NAME='G' DATASOURCE='KeyWebData'> select * from
    tbl_sites </CFQUERY> <cfform NAME='blah' ACTION='test.cfm' METHOD='POST'>
    <input TYPE='HIDDEN' NAME='UPDATE' VALUE='YES'> <cfoutput query='G'> <input
    type='text' name='SiteName_#currentRow#' VALUE='#ucase(sitename)#'> <input
    type='hidden' name='ID_#currentRow#' value='#SiteID#'> ON <input type='radio'
    name='Status_#currentRow#'><BR> </cfoutput> <br><br> <INPUT TYPE='SUBMIT'
    NAME='SUBMIT' VALUE='SUBMIT'> </cfform>

    Scooby Doobie Doo Guest

  2. #2

    Default Mutliple Item update not working, how?

    Why won't this multiple item update? I've followed examples here online, but I
    must be missing a tiny detail I can't see, Can anyone shed some light on this
    situation? <cfif IsDefined('FORM.Submit')> <cfloop list='#form.ID_#'
    index='i'> <cfif structKeyExists(form,'SiteName_#i#')>#sitename#<BR > <cfquery
    name='UpDate' datasource='KeyWebData'> UPDATE tbl_sites SET sitenmame =
    '#sitename#' WHERE (SiteID = #i#) </cfquery> </cfif> </cfloop> </cfif> </CFIF>
    </BODY> </HTML> <CFQUERY NAME='G' DATASOURCE='KeyWebData'> select * from
    tbl_sites </CFQUERY> <cfform NAME='blah' ACTION='test.cfm' METHOD='POST'>
    <input TYPE='HIDDEN' NAME='UPDATE' VALUE='YES'> <cfoutput query='G'> <input
    type='text' name='SiteName_#currentRow#' VALUE='#ucase(sitename)#'> <input
    type='hidden' name='ID_#currentRow#' value='#SiteID#'> ON <input type='radio'
    name='Status_#currentRow#'><BR> </cfoutput> <br><br> <INPUT TYPE='SUBMIT'
    NAME='SUBMIT' VALUE='SUBMIT'> </cfform>

    Scooby Doobie Doo Guest

  3. #3

    Default Re: Mutliple Item update not working, how?

    Nevermind, it's working now
    Scooby Doobie Doo Guest

Similar Threads

  1. Need update function for datagrid selected item
    By EvolvedDSM in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: May 19th, 02:19 PM
  2. Datagrid remove item and update array
    By nrutter in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: May 6th, 02:51 PM
  3. datagrid checkbox list edit item not working
    By cindy in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: October 19th, 03:39 AM
  4. (TextBox) (e.Item.Cells[2].Controls[0]) - Cast Invalid - Cannot update.
    By Ravichandran Mahalingam in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: January 12th, 09:11 PM
  5. Datagrid Item Delete Confirmation not working
    By Nedu N in forum ASP.NET Data Grid Control
    Replies: 2
    Last Post: December 4th, 02:16 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139