FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Erro ao criar Indice com ADS
Posts: 344
Joined: Tue Oct 11, 2005 11:33 AM
Erro ao criar Indice com ADS
Posted: Tue Oct 24, 2006 01:22 PM
Olá,

Ao tentar criar um indice com ADS me ocorre o seguinte erro:

Erro ADSCDX/3211 Erro de criação do arquivo.

Como seria as linhas abaixo:

USE "CLIENTES" alias "CLIE" shared new via "ADS"

if !file( "CLIENTES.CDX" )
   index on CLI_CODI tag CODI to ( "CLIENTES" ) for !CLIE->( deleted() )
   index on CLI_NOME tag NOME to ( "CLIENTES" ) for !CLIE->( deleted() )
endif

set index to ( "CLIENTES" )


Obrigado,

Rossine.
Obrigado, Regards, Saludos



Rossine.



Harbour and Harbour++
Posts: 840
Joined: Thu Oct 13, 2005 07:05 PM
Erro ao criar Indice com ADS
Posted: Tue Oct 24, 2006 03:55 PM

1) You don't need to use "" to open the file prior to index:

USE CLIENTES alias CLIE Shared new via "ADS"

2) You don't have to indicate the file name of the CDX file, since the name will be the same of the dbf:

index on CLI_CODI tag CODI

and that's all

3) You cannot use ANY program expression such ALIAS in no one part of the index:

Incorrect:

index on CLI_CODE tag CODI to ("CLIENTES") for !CLIE->(deleted())

Correct:

index con CLI_CODE tag CODI for ! deleted()

Saludos

R.F.
Posts: 344
Joined: Tue Oct 11, 2005 11:33 AM
Erro ao criar Indice com ADS
Posted: Tue Oct 24, 2006 07:47 PM
Olá Rene,

Primeiramente obrigado por responder :-)

Incorrect:

index on CLI_CODE tag CODI to ("CLIENTES") for !CLIE->(deleted())

Correct:

index con CLI_CODE tag CODI for ! deleted()


Realmente foi só tirar o ALIAS e funcionou 100 % :-)

Gracias,

Rossine.
Obrigado, Regards, Saludos



Rossine.



Harbour and Harbour++

Continue the discussion