I agree with Ryan. An old rule from way back:- Pass Keys Round Not Data
It's simpler to only keep keys across user interactions (either stored on the form or in the session). Otherwise you have 3 versions of data 1 - what's on the database. 2 - what you've saved in the session (or on the form) 3 - new values coming in from the form Not having the 2nd set of data is a big simplification. Some might say re-reading the database more frequently is inefficient. ie. Your database caching is less efficient than your server's caching of session info. Maybe - but can serializing data to the client form be faster than you DB?. Keith. --- Stephen Owens <[EMAIL PROTECTED]> wrote: > Ryan, > > I usually just discard the data object, other than > properties on the > form, either displayed or hidden, that I need to > identify it or populate > it. Then I reload it, update it, and finally update > the DB when/if the > form is submitted. > > -----Original Message----- > From: Ryan Cornia [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, December 12, 2001 4:36 PM > To: [EMAIL PROTECTED] > Subject: How do you pass a data object for editing? > > > I'm interested in finding out how other people are > passing data objects > between requests for updating. > > For instance - > > User clicks "Edit Record" > I load the data object from the database, copy the > properties to the > form, and put the data object in the session. > When the users presses save on the form, I get the > data object from the > session, try and do a consistency check to make sure > the key fields > match what is on the form, and do the update. > > Is there a way to pass the data object with the > form? Maybe via > serialization? That would keep it out of the > session, and remove the > consistency check. > > Thanks, > Ryan > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > __________________________________________________ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>