troubleshooting Question

URGENT - CFGrid array problem

Avatar of Ruben_Jimenez
Ruben_Jimenez asked on
Web Development SoftwareWeb Servers
7 Comments1 Solution535 ViewsLast Modified:
Using Coldfusion 8, I was attempting to use CFGRID and CFGRIDUPDATE to update records in my SQL server, but the update would not update the records.  Further review showed that what's contained in the array fields do not match associated fields.  I've attached a screen shot of result and the associated code.  I coulldn't find any problems like this in the site.  Notice that the same value appears twice for each successive fields.  What's that about?

Please help!
<cfif #IsDefined('form.Submit')#>
	<cfloop index="Row" From="1" to="#ArrayLen(form.Instruct.RowStatus.Action)#">
    	<cfif #form.Instruct.RowStatus.Action[row]# eq 'U'>
        <cfoutput>Row  - #Row#<br />
        		  Discretionary - #form.Instruct.Discretionary[Row]#<br />
                  Organization - #form.Instruct.Organization_Code[Row]#<br />                  
        		  Fund - #form.Instruct.Fund[Row]#<br />
                  Function - #form.Instruct.Function_Code[Row]#<br />
                  Object - #form.Instruct.Object[Row]#<br />
                  Sub-Object - #form.Instruct.Sub_Object_Code[Row]#<br />
                  PIC - #form.Instruct.PIC[Row]#<br />
                  Description - #form.Instruct.Description[Row]#<br />
                  LY - Budget - #form.Instruct.Last_Year_Budget[Row]#<br />
                  LY - Actual - #form.Instruct.Last_EOY_Actual[Row]#<br />
                  Requested - #Form.Instruct.Amount_Requested[Row]#
<cfquery name="Worksheet_11" datasource="Budget" dbtype="odbc">
	SELECT Campus_Worksheets.*
    FROM Campus_Worksheets
    WHERE Campus_Worksheets.[Organization_Code] = '101' and (Discretionary = 1) and [Function_Code] = '11'
    ORDER BY Discretionary, Organization_Code, Fund, Function_Code, Object, Sub_Object_Code, PIC
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
    	<cfgrid name= "Instruct" format="html" striperows="yes" query="Worksheet_11" selectmode="Edit" colheaderbold="yes" insert="yes" insertbutton="Insert">
        	<cfgridcolumn name="Discretionary" header="Discretionary" display="no" width="5" select="no">
            <cfgridcolumn name="Organization_Code" header="Organization_Code" display="no" width="5" select="no">        
        	<cfgridcolumn name="Fund" header="Fund" width="35" select="no">
        	<cfgridcolumn name="Function_Code" header="Func" width="35" select="no">
        	<cfgridcolumn name="Object" header="Object" width="50" select="no">
        	<cfgridcolumn name="Sub_Object_Code" header="SubObj" width="50" select="no">
        	<cfgridcolumn name="PIC" header="PIC" width="35" select="no">  
        	<cfgridcolumn name="Description" header="Description" width="250" select="no">    
        	<cfgridcolumn name="Last_Year_Budget" header="LY Budget" width="75" select="no"> 
        	<cfgridcolumn name="Last_EOY_Actual" header="LY Actual" width="75" select="no">   
        	<cfgridcolumn name="Amount_Requested" header="Requested" width="75" select="yes" type="numeric">
       <br />                             
        <cfinput type="submit" name="Submit" value="Submit">              
        <br />         

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros