Re: Array row field by field
Posted in 1994
david_mascorro@oncology.uthscsa.edu ("David Mascorro") writes: > Reply to: RE>Array row field by field va >>Date: 8/12/94 8:42 AM >>From: GeorgeT. Harris >> >>A colleague of mine has been unable to find a decent method of validating >an >array row in situations where field by field validation would impair >user >late. I can't find a way to back up a row. 'After insert' >would only cover >new rows and I need to worry about updating old rows >too. How about 'before >after row', Informix? >> >>I am working on a real kludge that uses an invisible noentry field >(dummy) at >the end of each array row. The input array is put in a while >loop. When an >error is detected, the row number is stored, and I leave >and re-enter the >> ... >Can you use the NEXT FIELD PREVIOUS command? This will move the cursor to your >previous field. Maybe you can execute this by the number of fields you have to >get back to the beginning of the line. Sorry, I don't think this will work either, because the AFTER ROW statement executes AFTER the user has left the ROW, and there's no way to back up to the row except for the NOENTRY field kludge the original author mentions. I don't find it as bothersome as the sender, but it is true that it can be slow for large arrays. They only suggestion I have to this (and if you dislike the NOENTRY kludge, you're going to *hate* this one) is to have two arrays, one full-sized and one the size of the screen only, so your screen control is limited to a single screen's worth (so you're not jumping down to row 50, but instead jumping down to row 5). The code required to coordinate the two arrays isn't awful, but it *is* a kludge. You could substitute a temp table for the large array as well, which solves the problem of bounded arrays as well. Dennis' #1 Feature Request for 4GL: NEXT ROW syntax for INPUT ARRAY. >input array ... ======================================================================= Dennis J. Pimple dennisp@informix.com Opinions expressed Senior Consultant -------------------- are mine, and do not Informix Software Inc Voice: 303-850-0210 necessarily reflect Denver Colorado USA Fax: 303-779-4025 those of my employer.