Not sure understood exactly what you are trying to do but I think this
may do it


I made a few assumptions
    - DataSetDtl.DsHdrID is not the primary key of the DataSetDtl table,
but a FK to a parent table

<!--- Form page --->
<CFQUERY name="GetPoints" dataSource="#application.DS#">
SELECT *
FROM DataSetDtl
WHERE DataSetDtl.DsHdrID = #URL.DsHdrID#
</CFQUERY>

<form name="points" action="" method="post">
<cfloop query="GetPoints">
  <!--- Ouput points record --->
  <input type="hidden" name="pointsPK_#GetPoints.currentRow#"
value="#GetPoints.PRIMARYKEY#" />
  <input type="text" name="pointsReading_#GetPoints.currentRow#"
value="" />
</cfloop>
<input type="hidden" name="noPoints" value="#GetPoints.recordCount#">
<input type="submit" name="submit" value="sumbit" />
</form>

<!--- Action page --->
<cfloop from="1" to="#form.noPoints#" index="i">
<cfset thisPK = form["pointsPK_#i#"]>
<cfset thisReading = form["pointsReading_#i#"]>

<cfquery name="update" datsource="">
  UPDATE
   DataSetDtl
  SET
   Reading = <cfqueryparam value="#thisReading#"
cfsqltype="cf_sql_varchar">
  WHERE
   PRIMARYKEY = <cfqueryparam value="#thisPK#"
cfsqltype="cf_sql_integer">
</cfquery>
</cfloop>


--
dc
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to