Switching to update mode from @ENTSEL

Barry Wiseman barry at gensoftdes.com
Mon Jul 9 09:04:54 PDT 2007


I'm trying to rewrite some old programs that do all their work standing on a locked 
record (everything hangs off initial @KEY triggers).  I want to instead have as much 
as possible happen within @ENTSEL processing so that the record is not locked.

However, the tree of user interaction runs deep -- various master/detail browses and 
their respective options, some of which require updating the master record and some 
don't.

Is there some graceful method (that hasn't occurred to me) of dropping into update 
mode at any arbitrary point deep within @ENTSEL processing?  I know I can

	::pushkey "U"; end:
  	@UPDATE::' do whatever:

but then I need flags and a jump table to know why I came there and it all gets 
pretty messy.

My other thought was to create an array of numfield(-) elements, and write all 
updates there instead of to the current record.  On exit, a single @UPDATE routine 
can loop thru the array, copying whatever's "dirty" into the appropriate fields.  But 
this type of deferred posting seems rife with possibility for disaster that would 
leave transactions corrupted and records out of balance.

Any suggestions welcome.


-----------------------------------------------------------------
  Barry Wiseman                              barry at gensoftdes.com
  Genesis Software Designs, Inc.            Voice: (212) 889-9191
  55 West 45 Street, New York, NY 10036       Fax: (212) 889-1589
-----------------------------------------------------------------



More information about the Filepro-list mailing list