Article View: borland.public.vdbase.data.sql
Article #902Re: Filter on a Value
From: Mark Bradley
Date: Sat, 27 Jun 1998 00:00
Date: Sat, 27 Jun 1998 00:00
70 lines
2605 bytes
2605 bytes
When I tried to set a filter based on a custom form property, it wouldn't work at all, just gave some weird error message. In the end I had to use Public variables in the filter statement and it worked fine.. I have come across other situations too where custom form properties can't be used. I guess there's plenty of life left yet in the old Public variables! On Sat, 27 Jun 1998 04:51:43 GMT, tgp@compuserve.com (Tom Preston) wrote: >I have spent hours on this and don't even know if it can be done. > >I have a ComboBox on a form. The form contains a DataModule. The >DataModule contains an SQL file that selects two dbf files (cusmas and >transmas). > >What is the proper syntax to use, in the filter propertyt of the >rowset, to filter based on the value of an entryfield (or var). All >of the examples given in the newest version of the OLH are constants; >no vars. > >Please see the "--->" comment in the following example code. > >Thanks for the Help, >Tom Preston > >//////////////////////////////////////////////////////////// >** END HEADER -- do not remove this line >// >// Generated on 06/26/1998 >// >class leaseDataModule of DATAMODULE > this.LEASE1 = new QUERY() > this.LEASE1.parent = this > with (this.LEASE1) > left = -0.1429 > top = -0.0455 > sql = "@leasmain.sql" > active = true > endwith > > with (this.LEASE1.rowset) > beginFilter = class::ROWSET_BEGINFILTER > applyFilter = class::ROWSET_APPLYFILTER > >--->The following filter (being a constant) works fine. >--->But what would the syntax be if I wanted to filter >--->based on the value of "AnyForm.Cusnum.Value." > > filter = "tcusnum=1" > > endwith > > this.QUERY1 = new QUERY() > this.QUERY1.parent = this > with (this.QUERY1) > left = 3 > top = 2.5 > sql = "@leasecn.sql" > active = true > endwith > > function rowset_applyFilter > return ROWSET::applyFilter() > > function rowset_beginFilter > return ROWSET::beginFilter() >endclass
Technical Details
Message-ID:
<3594d213.42845148@forums.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<359470a5.45211047@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,9cc7a67ae9405e2d X-Google-Attributes: gidff5a1,public From: bradtech@bigpond.com (Mark Bradley) Subject: Re: Filter on a Value Date: 1998/06/27 Message-ID: <3594d213.42845148@forums.inprise.com> X-Deja-AN: 366563200 Content-Transfer-Encoding: 7bit References: <359470a5.45211047@forums.borland.com> Content-Type: text/plain; charset=us-ascii Organization: Bradtech Systems Pty Ltd Mime-Version: 1.0 Newsgroups: borland.public.vdbase.data.sql