Article View: borland.public.vdbase.data.sql
Article #189Sql filter
From: Calciotel
Date: Sun, 14 Mar 1999 00:00
Date: Sun, 14 Mar 1999 00:00
71 lines
2405 bytes
2405 bytes
Hi,
I would like to know more imformation on the use of CanGetRow() event on a
query:
I have a form with 2 table in relation father-child 1:N;
I must in the same table filter the rowset for same fields of the father
table and one field of the child table and the query do need to be live for
modified it.
I input the filter option in same entryfield object and then i apply the
form.query1.rowset.filter=.... value of entryfiled
How i can do for filter also a field of the child table?? Can i do the
CanGetRow() function?? How i can use it??
Example of may source code:
this.QUERY1 = new QUERY()
this.QUERY1.parent = this
with (this.QUERY1)
left = 55
top = -0.0455
database = form.database1
sql = 'select * from "calciato.dbf"'
active = true
endwith
this.QUERY2 = new QUERY()
this.QUERY2.parent = this
with (this.QUERY2)
left = 65
top = -0.0455
database = form.database1
sql = 'select * from "note.dbf"'
active = true
endwith
with (this.QUERY2.rowset)
filterOptions = 3 // Lunghezza parziale e ignora M/m
indexName = "CALNOT"
masterRowset = parent.parent.query1.rowset
masterFields = "CALCIAID"
endwith
this.FIELD_SER = new ENTRYFIELD(this)
with (this.FIELD_SER)
enabled = false
height = 0.8182
left = 61
top = 2.5
width = 24
fontName = "MS Sans Serif"
fontSize = 8
fontBold = true
value = ""
validErrorMsg = "Dato immesso non valido "
pageno = 1
endwith
function PUSHBUTTON_filter_onClick
wnom=trim(ltrim(form.field_ser.value))
WFIL="observ='&wnom' "
form.query1.rowset.beginfilter()
form.query1.rowset.filter=wfil
form.query1.rowset.refresh()
form.query1.rowset.applyfilter()
return
This go only for the input fields of the father table...
How can i do???
Thank's in advanced.
Andrea
Technical Details
Message-ID:
<7cfvaq$sgd1@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,13a2a4f86ca63c6,start X-Google-Attributes: gidff5a1,public From: "Calciotel" <calciotel@lunet.it> Subject: Sql filter Date: 1999/03/14 Message-ID: <7cfvaq$sgd1@forums.borland.com> X-Deja-AN: 454790534 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.vdbase.data.sql X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4