Problema pra criar CDX
Moderador: Moderadores
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Problema pra criar CDX
Estou estranhando o comportamento.
Tenho a rotina de criar índices, sempre igual pra todos os arquivos e índices.
use arquivo
index on chave tag (nome)
index on chave2 tag (outro)
mas agora precisei usar pra arquivos em pastas.
use pasta\arquivo
o problema é que ao final da reindexação, somente uma única tag está dentro do CDX, para os arquivos em pasta diferente.
Alguma idéia?
Nota:
A rotina usa array pra TODOS os dbfs e TODOS os índices.
A única diferença é alguns arquivos com path no nome.
Tenho a rotina de criar índices, sempre igual pra todos os arquivos e índices.
use arquivo
index on chave tag (nome)
index on chave2 tag (outro)
mas agora precisei usar pra arquivos em pastas.
use pasta\arquivo
o problema é que ao final da reindexação, somente uma única tag está dentro do CDX, para os arquivos em pasta diferente.
Alguma idéia?
Nota:
A rotina usa array pra TODOS os dbfs e TODOS os índices.
A única diferença é alguns arquivos com path no nome.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Problema pra criar CDX
Código: Selecionar todos
SELECT 0
IF ! UseSoDbf( cDbfName )
RETURN .F.
ENDIF
FOR nCont = 1 TO Len( acIndice )
GrafTempo( "Criando " + acIndice[ nCont, 1 ] + IndexExt() )
SET INDEX TO // para usar for
GOTO TOP // para usar for
xCampo := acIndice[ nCont, 2 ]
IF Len( acIndice[ nCont ] ) == 2
INDEX ON &xCampo TAG ( ToTag( acIndice[ nCont, 1 ] ) ) TO ( cDbfName ) EVAL GrafInd()
ELSEIF Len( acIndice[ nCont ] ) == 3
INDEX ON &xCampo TAG ( ToTag( acIndice[ nCont, 1 ] ) ) TO ( cDbfName ) FOR &( acIndice[ nCont, 3 ] ) EVAL GrafInd()
ELSEIF Len( acIndice[ nCont ] ) == 4
INDEX ON &xCampo TAG ( ToTag( acIndice[ nCont, 1 ] ) ) TO ( cDbfName ) DESCEND EVAL GrafInd()
ELSEIF Len( acIndice[ nCont ] ) == 5
INDEX ON &xCampo TAG ( ToTag( acIndice[ nCont, 1 ] ) ) TO ( cDbfName ) UNIQUE EVAL GrafInd()
ENDIF
SET INDEX TO
//nRecOk += LastRec()
NEXT
USE
chmodFile( cDbfName + IndexExt() )
Apesar do chmodFile(), é no Windows.
Acrescentei o nome do arquivo de índice depois, pra ver se fazia diferença.
E Acrescentei o ToTag() pra não considerar path (a rotina vale pra IDX e CDX)
Dois itens do array
Código: Selecionar todos
IndexDbf( "B0600", "COBR B0600 Orcamento Obras", "COBR" )
IndexInd( "B06001", "Cod_Emp + Cod_Pi" )
IndexInd( "B06002", "Nome" )
IndexInd( "B06003", "Cod_Cli" )
IndexDbf( cPathDbf + "B2500", "PRD1 Produto Principal", "PRD1" )
IndexInd( cPathDbf + "B25001", "Cod_Pro" )
IndexInd( cPathDbf + "B25002", "Nome" )
IndexInd( cPathDbf + "B25003", "Substr( Nome, 21, 90 )" )
é um único array com tudo, tudo no mesmo fonte.
Só sobra comportamento diferente com path.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- Itamar M. Lins Jr.
- Administrador

- Mensagens: 7928
- Registrado em: 30 Mai 2007 11:31
- Localização: Ilheus Bahia
- Curtiu: 1 vez
Problema pra criar CDX
Ola!
Tentou sem "TO (cDBFNAME)" é desnecessário.
Saudações,
Itamar M. Lins Jr.
Tentou sem "TO (cDBFNAME)" é desnecessário.
Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Itamar M. Lins Jr.
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Problema pra criar CDX
Estava sem nome antes.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Problema pra criar CDX
Resolvido.
Esqueci que são duas rotinas, e estava alterando só uma.
E o que atrapalhou foi a barra de path estilo Linux.
Ao entrar como parte da tag, todas as tags ficaram iguais.
Esqueci que são duas rotinas, e estava alterando só uma.
E o que atrapalhou foi a barra de path estilo Linux.
Ao entrar como parte da tag, todas as tags ficaram iguais.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Problema pra criar CDX
Quintas,
o que é esse comando "disp stat" desculpa a minha ignorância, isso é do harbour ?
o que é esse comando "disp stat" desculpa a minha ignorância, isso é do harbour ?
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
-
alxsts
- Colaborador

- Mensagens: 3092
- Registrado em: 12 Ago 2008 15:50
- Localização: São Paulo-SP-Brasil
Problema pra criar CDX
Olá!
Este é o famoso e ancestral comando Display status do dot prompt do dBASE.asimoes escreveu:o que é esse comando "disp stat" desculpa a minha ignorância, isso é do harbour ?
[]´s
Alexandre Santos (AlxSts)
Alexandre Santos (AlxSts)
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Problema pra criar CDX
Isso.
Que no meu dbase executa esta rotina:
Que no meu dbase executa esta rotina:
Código: Selecionar todos
STATIC FUNCTION cmdListStatus()
LOCAL nCont, nCont2, nSelect := Select()
FOR nCont = 1 TO 255
IF Len( Trim( Alias( nCont ) ) ) != 0
SELECT ( nCont )
SayScroll()
SayScroll( "Alias " + Str( nCont, 2 ) + " -> " + Alias() + iif( nCont == nSelect, " ==> Actual Alias", "" ) )
FOR nCont2 = 1 TO 100
IF Len( Trim( OrdKey(nCont2 ) ) ) == 0
EXIT
ENDIF
SayScroll( " Tag " + OrdName( nCont2 ) + " -> " + OrdKey( nCont2 ) )
NEXT
IF Len( Trim( dbFilter() ) ) != 0
SayScroll( " Filter: " + dbFilter() )
ENDIF
IF Len( Trim( dbRelation() ) ) != 0
SayScroll(" Relation: " + dbRelation() + " Alias: " + Alias( dbRSelect() ) )
ENDIF
ENDIF
NEXT
SELECT ( nSelect )
SayScroll( "Current Path -> " + hb_cwd() )
SayScroll()
RETURN NIL
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- Itamar M. Lins Jr.
- Administrador

- Mensagens: 7928
- Registrado em: 30 Mai 2007 11:31
- Localização: Ilheus Bahia
- Curtiu: 1 vez
Problema pra criar CDX
Ola!
Cadê o "modi stru" ?
Saudações,
Itamar M. Lins Jr.
Cadê o "modi stru" ?
Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Itamar M. Lins Jr.
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Problema pra criar CDX
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/