Yes, it is an update form with checkboxes. The reason I cannot delete everything and reinsert it (beyond the fact that this sounds very hard on the database) is that other data is stored in the database for each record which I cannot duplicate. Therefore, I really need to be to utilize the existing records and just add new ones as necessary.
Thanks -- Jeff -----Original Message----- From: Deanna Schneider [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2003 12:15 PM To: CF-Talk Subject: Re: Compare list vs. recordset? Is this for an update form with checkboxes? I usually handle this by deleting the old entries and reinserting, rather than taking the time to loop through and look for updates.... -Deanna ----- Original Message ----- From: "Jeff Chastain" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, September 05, 2003 11:26 AM Subject: Compare list vs. recordset? > I am looking for suggestions on the best way to go about this. > > I am receiving two comma separated lists from a form - one is a list of > numerical object ids and the other is a corresponding list of numerical > object classes (i.e. the first item in the object id list has a class > corresponding to the first item in the object class list). > > I have a database table that contains two fields - objectID and objectClass. > Now, I need to compare the information in the database with the information > received in the two lists. If an object is in the list and not in the > database, then it needs to be added to the database. > > One other potential issue - there may be duplicate object ids in the object > id list - the combination of the object id and object class makes each entry > unique. > > Anybody have any suggestions on the best method to compare these two > structures? > > Example - > ObjectID List = 1,2,3,3,1,4,5 > ObjectClass List = 1,1,1,2,2,1,2 > > Recordset (objectid, objectclass) > (1,1), (2,1), (1,2), (4,1) > > so ... the objectID, objectClass pair 3,1 and 5,2 would need to be added > to the database. > > Thanks for any suggestions. > -- Jeff > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm