Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!cbmvax!cbmehq!cbmger!peterk From: peterk@cbmger.UUCP (Peter Kittel GERMANY) Newsgroups: comp.sys.amiga.multimedia Subject: Re: Record selection in AVision Keywords: Vision, database, record, selection, db Message-ID: <869@cbmger.UUCP> Date: 8 Feb 91 09:17:38 GMT References: <00309.AA00309@digitm.UUCP> Reply-To: peterk@cbmger.UUCP (Peter Kittel GERMANY) Organization: Commodore Bueromaschinen GmbH, West Germany Lines: 39 In article <00309.AA00309@digitm.UUCP> steed@digitm.UUCP (Steed Kulka) writes: > >When you select a database record using a string variable whose actual value >may reference several records, AV selects the first record in list, and this >is fine; but when the key field is numeric, AV selects the last record in list. > >Consider a record whose fields are: >>CODE I >NAME S >>ORD# I > >Records in database are: >1 1 1 2 3 >HUEY DEWEY LOUIE DONALD DAISY >1 2 3 4 5 > >Now assign variable and select record: >>CODE : searchnum > > is now "LOUIE" and is 3. > >If field NAME was a key field and you searched the letter "D", AV would have >selected record #2, the first whose NAME field starts with that letter. Sorry, don't know about AV internals, I only can guess. In fact, you don't search for the same set of records in your example. So the order in which the selected records get presented may be incidentally and may mirror the physical storage order of the records. The select mechanism is said to give you all matching records when you process them in child icons, but there is no word made about the order inside this selected set. But as I said, this is pure speculation. A better test would be to set up a test database where you have some records that result in exactly the same selection by integer or string fields. (Was too lazy to try this myself :-) -- Best regards, Dr. Peter Kittel // E-Mail to \\ Only my personal opinions... Commodore Frankfurt, Germany \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk