Selecting for update within stored procedures
Posted in 1993
I'd like to start a general discussion on the use of the "update where current" construct and its applicability within stored procedures. Most of my update routines involve the following sequence of events: ( via 4GL 4.1, and OnLine 5.01 ) 1) open a cursor, selecting the record "for update" 2) display the record in a form for the user's revision 3) "update where current" to effect the update. My intent in (1) is to restrict any other user from updating my record while I'm working with it. Now, I'm trying to re-implement all my SQL calls using stored procedures and can't identify any way to accomplish this set of actions, other than 1) actually update the record with its current value (locks the record) 2) as above, display the record for revision 3) "pure" UPDATE of the record, using its primary key and the user's changes. This method seems clunky. Is there an elegant solution? -- In-Real-Life: John Bossert, Thalatta Corporation, (+1 206.455.9838) Domain: bossert@thalatta.com Path: ...!sun!sunup!thebes!bossert