Page 1 of 1

Erro ao criar Indice com ADS

PostPosted: Tue Oct 24, 2006 1:22 pm
by Rossine
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:

Code: Select all  Expand view
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.

PostPosted: Tue Oct 24, 2006 3:55 pm
by R.F.
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()

PostPosted: Tue Oct 24, 2006 7:47 pm
by Rossine
Olá Rene,

Primeiramente obrigado por responder :D

Code: Select all  Expand view
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 % :wink:

Gracias,

Rossine.