Página 1 de 1

erro ao utilizar fun

Publicado: Vie Jun 19, 2009 7:25 pm
por ricardo
Não consigo utilizar função descend para indexar um arquivo DBF.
O xailer diz que a função não existe.
Atenciosamente,
Ricardo C. Freitas

erro ao utilizar fun

Publicado: Vie Jun 19, 2009 8:34 pm
por emeasoft
Ricardo, boa tarde
Se for isto que vc está querendo fazer, por exemplo
INDEX ON Descend(Upper(Nome)) TO Temp
Fiz o teste assim e funcionou usando o Xailer 2.
Explique melhor qual o erro, se possí­vel colando aqui.
Outra coisa, consulte
Projetos -> Propriedades do projeto -> Livrarias, se
as LIB estão marcadas corretamente.
Mário
*******************MANUAL xHarbour:
Descend()
Converts a value for a descending index.
Syntax
Descend( <xValue> ) --> xDescend
Arguments
<xValue>
An expression whose value must be of data type Character, Date, Logic or
Numeric. Return
The function returns the converted value suitable for creating a descending
index. The data type is the same as for <xValue>, except for Date values.
The converted value for Dates is of numeric data type.
Description
Descend() is a utility function that can be used for the creation of a
descending index. The argument passed to Descend() is converted so that the
resulting value is sorted logically like the initial value in descending
order. Any portion of an index expression can include the Descend()
function. This allows for sorting partial index expressions in descending
order. Any subsequent SEEK operations must convert the searched value using
Descend().
If the entire index should be created in descending order, it is recommended
to use the DESCENDING option of the INDEX command. This is advantageous
since searched values do not need to be converted with Descend().
Info
See also: CtoD(), DbSeek(), DtoC(), DtoS(), INDEX, OrdCondSet(),
OrdCreate(), OrdDescend(), SEEK, Str(), Val()
Category: Conversion functions
Source: rtldescend.c
LIB: xhb.lib
DLL: xhbdll.dll
Example
// The example creates a descending index using the Descend()
// function and outlines how to search in such an index with SEEK.
PROCEDURE Main
? Descend( 789 ) // result: -789
USE Customer NEW
INDEX ON Descend(Upper(Lastname)) TO Temp
GO TOP
? FIELD->Lastname // result: Waters
GO BOTTOM
? FIELD->Lastname // result: Alberts
SEEK Descend( "KELLER" )
? FIELD->Lastname // result: Keller
USE
RETURN

erro ao utilizar fun

Publicado: Vie Jun 19, 2009 9:07 pm
por Carlos Ortiz
Agrega esto en tu MAIN.prg
REQUEST DESCEND
Atte. CO.

erro ao utilizar fun

Publicado: Dom Jun 21, 2009 12:55 am
por ricardo
Obrigado Carlos, funcionou corretamente.
E obrigado a tdos que responderam.
Atenciosamente,
Ricardo C. Freitas"Carlos Ortiz" <cortizassist@hotmail.com> wrote:
>Agrega esto en tu MAIN.prg
>
>REQUEST DESCEND
>
>Atte. CO.
>
>