Frank J. Polan
2004-02-18 22:29:04 UTC
Ken,
from the OLH
.........
ExactMatch
Determines whether rowset searches are conducted using a partial
string or an exact string match.
Property of Rowset
......................................
dBASE PLUS b1703 Win2000
Save the following form and run from Navigator
In the Entryfield enter the first letter of any of the 3 fields
Click the findkey button.
The findkey() returns true
Accorinding to the OLH it should return false when setexact is true
Frank Polan
............................... exactmatch.wfm ...............
close databases
close all
clear all
release all
clear memory
clear program
set proc to
//
if file('test.dbf')
drop table 'test.dbf'
endif
create table 'test.dbf' ( ;
field1 char (10), ;
field2 char (10) ;
)
insert into test (field1, field2) values ('abc', 'def')
insert into test (field1, field2) values ('ghi', 'jkl')
insert into test (field1, field2) values ('mno', 'pqr')
create index field1 on 'test.dbf' (field1)
** END HEADER -- do not remove this line
//
// Generated on 02/18/2004
//
parameter bModal
local f
f = new ExactmatchForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class ExactmatchForm of FORM
with (this)
onOpen = {;this.entryfield2.value := form.rowset.exactmatch}
height = 16
left = 53
top = 0
width = 40
text = ""
endwith
this.TEST1 = new QUERY()
this.TEST1.parent = this
with (this.TEST1)
left = 25
top = 4
sql = 'select * from "test.dbf"'
active = true
endwith
with (this.TEST1.rowset)
indexName = "FIELD1"
endwith
this.GRID1 = new GRID(this)
with (this.GRID1)
dataLink = form.test1.rowset
height = 5.5
left = 4
top = 1
width = 26
endwith
this.CHECKBOX1 = new CHECKBOX(this)
with (this.CHECKBOX1)
height = 1.0909
left = 5
top = 8
width = 14.1429
text = "Record Found"
endwith
this.ENTRYFIELD1 = new ENTRYFIELD(this)
with (this.ENTRYFIELD1)
height = 1
left = 6
top = 9.5
width = 8
value = ""
endwith
this.PUSHBUTTON1 = new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
onClick = class::PUSHBUTTON1_ONCLICK
height = 1.0909
left = 6
top = 11.5
width = 15.2857
text = "Findkey"
endwith
this.TEXT1 = new TEXT(this)
with (this.TEXT1)
height = 1
left = 3
top = 13.5
width = 12
text = "Exactmatch"
endwith
this.ENTRYFIELD2 = new ENTRYFIELD(this)
with (this.ENTRYFIELD2)
height = 1
left = 18
top = 13.5
width = 8
value = ""
endwith
this.rowset = this.test1.rowset
function PUSHBUTTON1_onClick
x = form.rowset.findkey(form.entryfield1.value)
form.checkbox1.value := x
return
endclass
.
...............................
On Tue, 17 Feb 2004 23:13:31 +0100, Romain Strieff [dBVIPS]
from the OLH
.........
ExactMatch
Determines whether rowset searches are conducted using a partial
string or an exact string match.
Property of Rowset
......................................
dBASE PLUS b1703 Win2000
Save the following form and run from Navigator
In the Entryfield enter the first letter of any of the 3 fields
Click the findkey button.
The findkey() returns true
Accorinding to the OLH it should return false when setexact is true
Frank Polan
............................... exactmatch.wfm ...............
close databases
close all
clear all
release all
clear memory
clear program
set proc to
//
if file('test.dbf')
drop table 'test.dbf'
endif
create table 'test.dbf' ( ;
field1 char (10), ;
field2 char (10) ;
)
insert into test (field1, field2) values ('abc', 'def')
insert into test (field1, field2) values ('ghi', 'jkl')
insert into test (field1, field2) values ('mno', 'pqr')
create index field1 on 'test.dbf' (field1)
** END HEADER -- do not remove this line
//
// Generated on 02/18/2004
//
parameter bModal
local f
f = new ExactmatchForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class ExactmatchForm of FORM
with (this)
onOpen = {;this.entryfield2.value := form.rowset.exactmatch}
height = 16
left = 53
top = 0
width = 40
text = ""
endwith
this.TEST1 = new QUERY()
this.TEST1.parent = this
with (this.TEST1)
left = 25
top = 4
sql = 'select * from "test.dbf"'
active = true
endwith
with (this.TEST1.rowset)
indexName = "FIELD1"
endwith
this.GRID1 = new GRID(this)
with (this.GRID1)
dataLink = form.test1.rowset
height = 5.5
left = 4
top = 1
width = 26
endwith
this.CHECKBOX1 = new CHECKBOX(this)
with (this.CHECKBOX1)
height = 1.0909
left = 5
top = 8
width = 14.1429
text = "Record Found"
endwith
this.ENTRYFIELD1 = new ENTRYFIELD(this)
with (this.ENTRYFIELD1)
height = 1
left = 6
top = 9.5
width = 8
value = ""
endwith
this.PUSHBUTTON1 = new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
onClick = class::PUSHBUTTON1_ONCLICK
height = 1.0909
left = 6
top = 11.5
width = 15.2857
text = "Findkey"
endwith
this.TEXT1 = new TEXT(this)
with (this.TEXT1)
height = 1
left = 3
top = 13.5
width = 12
text = "Exactmatch"
endwith
this.ENTRYFIELD2 = new ENTRYFIELD(this)
with (this.ENTRYFIELD2)
height = 1
left = 18
top = 13.5
width = 8
value = ""
endwith
this.rowset = this.test1.rowset
function PUSHBUTTON1_onClick
x = form.rowset.findkey(form.entryfield1.value)
form.checkbox1.value := x
return
endclass
.
...............................
On Tue, 17 Feb 2004 23:13:31 +0100, Romain Strieff [dBVIPS]
paraphrased...
I have a table that the content of one record in the field "service" is
"Bloc operatoire".
----------------------------
var = "Bloc ope"
result = form.query1.rowset.findkey(var)
----------------------------
the result is TRUE. Normal or not ? Thanks for help.
HELP exactmatch"Bloc operatoire".
----------------------------
var = "Bloc ope"
result = form.query1.rowset.findkey(var)
----------------------------
the result is TRUE. Normal or not ? Thanks for help.