|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by Ruben_Jimenez in ColdFusion Studio, ColdFusion Application Server
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!
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:
|
<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]#
</cfoutput>
</cfif>
</cfloop>
</cfif>
<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
</cfquery>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<cfform>
<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">
</cfgrid>
<br />
<cfinput type="submit" name="Submit" value="Submit">
<br />
</cfform>
</body>
</html>
|
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625