Erro ao criar Indice com ADS

Post Reply
Rossine
Posts: 343
Joined: Tue Oct 11, 2005 11:33 am

Erro ao criar Indice com ADS

Post 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

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.
R.F.
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Post 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()
Saludos
R.F.
Rossine
Posts: 343
Joined: Tue Oct 11, 2005 11:33 am

Post by Rossine »

Olá Rene,

Primeiramente obrigado por responder :D

Code: Select all

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.
Post Reply