Re: TZF - KeyMaker with Virtual File
Philip Kidder <[email protected]>
| Newsgroups | gmane.comp.lang.delphi.topaz |
|---|---|
| Message-ID | <[email protected]> |
Chris & Marie, Thanks for your suggestions. I got everything working but had to resort to standard databases. I wanted two virtual databases on the form. The first one to display the file names in name order. The second to sort the data by which CD it was stored on. As soon as I added the second virtural database all hell broke loose. The first database would not return and values when I did a GetCField, the second database would not sort. When I changed the order of lines in the code values were returned from the first database but the second still would not sort. I finally gave up and used one standard database with two indexes. Does anyone have any idea why I can't have two virtural files on the same form? Phil Kidder ----- Original Message ----- From: "Chris Morgan" <[email protected]> To: <[email protected]> Sent: Thursday, March 27, 2003 4:03 AM Subject: Re: TZF - KeyMaker with Virtual File > Hi, > > It's quite straightforward to create an index for virtual files: > > { set this in code or you can use the object inspector } > TzVFile.KeyMaker := IndexFunction; > > { then in the implementation of the IndexFunction method: } > function TForm1.IndexFunction: string; > begin > { this method should just return the field value > for the field(s) which you want to index by } > Result := TzVFile.Fields[3].AsString; { this will sort on the 4th > field } > end; > > This index will not be saved to file if you use the SaveToFile method > to write your data to a DBF file. > > Cheers, > > Chris > > ----- Original Message ----- > From: <[email protected]> > To: <[email protected]> > Sent: Wednesday, March 26, 2003 11:32 PM > Subject: TZF - KeyMaker with Virtual File > > > > Hello, > > > > I did this once before but I can't remember how. I want to define my > own > > key for a virtual file. I am using Topaz 7.51 and have read the > addendum > > to the manual and am still confussed. > > > > Does anyone have a simple example of how to define my own key for a > > virtual file? > > > > Thanks. > > > > Phil Kidder > > > > > ==^================================================================ This email was sent to: [email protected] EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt Or send an email to: [email protected] TOPICA - Start your own email discussion group. FREE! http://www.topica.com/partner/tag02/create/index2.html ==^================================================================