Compare two record sets

Results 1 to 2 of 2

Thread: Compare two record sets

  1. #1
    Join Date
    Dec 1969

    Default Compare two record sets

    I would like to know if it this is possible. Two record sets will be defined. The first recordset will display values that can be edited. Upon submission the values will be inserted in to the second recordset.<BR>The posted asp file will open the two recordsets and a comparison will be made for the changed values. <BR>This is where I&#039;m stuck. How do you compare to record sets.<BR>This is the code I&#039;ve come up with so far. I don&#039;t know how to get a handle on the second recordset while I&#039;m looping through the first one.<BR><BR>Any suggestion or help would be appreciated.<BR><BR>For intCol = 0 to Building.fields.count - 1<BR>bfield = Building.fields(intCol).Name<BR>If Trim(Building(bfield)) == Trim(BuildingChg(bfield)) Then<BR>&#039; write code to audit trail table.<BR>end if<BR>Next<BR>&#039; This would update the second record set<BR>BuildingChg("Userkey") = Session("MM_UserKey")<BR>BuildingChg("Action") = "T"<BR>BuildingChg("DateRequested") = Date()<BR><BR>BuildingChg.Update

  2. #2
    Join Date
    Dec 1969

    Default Don't do it... the unchanged value as a HIDDEN form field in the page and then simply check for a difference between the hidden value and the edited value. Presto.<BR><BR>Many times more efficient than involving the two different tables, I would bet.<BR><BR>

Posting Permissions

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