|
HFilter, how does it work ? |
Iniciado por soubyms, 23,jun. 2001 00:31 - 3 respuestas |
| |
| | | |
|
| |
Publicado el 23,junio 2001 - 00:31 |
Can some one give mi a hint on how to make HFilter's second option Hfilter with a condition.
nMes is int nAno is int
nMes = 2 nAno = 2001
HFilter( "RECETAS" , "RECETAS.REMES = '" + nMes + "' and RECETAS.REANO = '" + nAno + "'" )
HReadFirst( "RECETAS" , "CLAVE" )
This works erratically, and it's driving me nuts.
I DON'T have an index on REMES nor on REANIO.
Thx |
| |
| |
| | | |
|
| | |
| |
Publicado el 23,junio 2001 - 23:29 |
Hi MAriano
Try
HFilter( "RECETAS" , "CLAVE" ,"RECETAS.REMES = '" + nMes + "' and RECETAS.REANO = '" + nAno + "'" )
HReadFirst( "RECETAS" , "CLAVE" )
HFilter only works on a key value, and you can't change that value beteen the filter and the browse.
I use a filtered browse for better results. See the manual under Browse.
Gill
Mariano Saul wrote:
Can some one give mi a hint on how to make HFilter's second option Hfilter with a condition.
nMes is int nAno is int
nMes = 2 nAno = 2001
HFilter( "RECETAS" , "RECETAS.REMES = '" + nMes + "' and RECETAS.REANO = '" + nAno + "'" )
HReadFirst( "RECETAS" , "CLAVE" )
This works erratically, and it's driving me nuts.
I DON'T have an index on REMES nor on REANIO.
Thx
|
| |
| |
| | | |
|
| | |
| |
Publicado el 25,junio 2001 - 11:51 |
This is right, but your syntax is not correct, you don't have to put the name of your data file ( RECETAS.REMES ) HFilter( "RECETAS" , "CLAVE" ,"REMES = '" + nMes + "' and REANO = '"+ nAno + "'" ) And remember the single quote is used for the TEXT not for NUMBERS !!!! So your line code must be :
HFilter( "RECETAS" , "CLAVE" ,"REMES = " + nMes + " and REANO = "+ nAno )
I also recommend you to use the tostring function ( you will control the format of your numbers in the filter string ).
"Gill Davis" <gill@postrans.com> a écrit dans le message news: 3B347DB1.F6296D52@postrans.com...
Hi MAriano Try HFilter( "RECETAS" , "CLAVE" ,"RECETAS.REMES = '" + nMes + "' and RECETAS.REANO = '" + nAno + "'" ) HReadFirst( "RECETAS" , "CLAVE" ) HFilter only works on a key value, and you can't change that value beteen the filter and the browse. I use a filtered browse for better results. See the manual under Browse. Gill Mariano Saul wrote: Can some one give mi a hint on how to make HFilter's second option
Hfilter
with a condition.
nMes is int nAno is int
nMes = 2 nAno = 2001
HFilter( "RECETAS" , "RECETAS.REMES = '" + nMes + "' and RECETAS.REANO = '"
+ nAno + "'" )
HReadFirst( "RECETAS" , "CLAVE" )
This works erratically, and it's driving me nuts.
I DON'T have an index on REMES nor on REANIO.
Thx
|
| |
| |
| | | |
|
| | |
| |
Publicado el 27,junio 2001 - 20:13 |
Hi
This syntax does not seem fully correct however. There are two different syntax you can use with your HFilter : 1. Hfilter(FILE,KEY,MINVALUE,CONDITION)
2. KEY=Hfilter(FILE,CONDITION)
The second one gives you the key you have to use after the filter is set. In the first one you cannot avoid giving the minvalue of the key.
Hope this will help.
BOUDOT Sébastien wrote:
This is right, but your syntax is not correct, you don't have to put the name of your data file ( RECETAS.REMES ) HFilter( "RECETAS" , "CLAVE" ,"REMES = '" + nMes + "' and REANO = '"+ nAno + "'" ) And remember the single quote is used for the TEXT not for NUMBERS !!!! So your line code must be : HFilter( "RECETAS" , "CLAVE" ,"REMES = " + nMes + " and REANO = "+ nAno ) I also recommend you to use the tostring function ( you will control the format of your numbers in the filter string ). "Gill Davis" <gill@postrans.com> a écrit dans le message news: 3B347DB1.F6296D52@postrans.com... Hi MAriano Try HFilter( "RECETAS" , "CLAVE" ,"RECETAS.REMES = '" + nMes + "' and RECETAS.REANO = '" + nAno + "'" ) HReadFirst( "RECETAS" , "CLAVE" ) HFilter only works on a key value, and you can't change that value beteen the filter and the browse. I use a filtered browse for better results. See the manual under Browse. Gill Mariano Saul wrote: Can some one give mi a hint on how to make HFilter's second option
Hfilter with a condition.
nMes is int nAno is int
nMes = 2 nAno = 2001
HFilter( "RECETAS" , "RECETAS.REMES = '" + nMes + "' and RECETAS.REANO =
'" + nAno + "'" )
HReadFirst( "RECETAS" , "CLAVE" )
This works erratically, and it's driving me nuts.
I DON'T have an index on REMES nor on REANIO.
Thx
|
| |
| |
| | | |
|
| | | | |
| | |
|