Article View: borland.public.vdbase.data.sql
Article #901Filter on a Value
From: Tom Preston
Date: Sat, 27 Jun 1998 00:00
Date: Sat, 27 Jun 1998 00:00
59 lines
1960 bytes
1960 bytes
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:
<359470a5.45211047@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,9cc7a67ae9405e2d,start X-Google-Attributes: gidff5a1,public From: tgp@compuserve.com (Tom Preston) Subject: Filter on a Value Date: 1998/06/27 Message-ID: <359470a5.45211047@forums.borland.com> X-Deja-AN: 366515103 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.vdbase.data.sql