PROBLEMAS DBFCDX
Enviado: 17 Set 2005 17:10
Caros colegas....
Estou com problemas na indexação usando o dbfcdx..... Tenho um indice com (02) dois TAG's... cliecod e cliente... segue a estrutura do arquivo:
CAMPO TIPO TAMANHO
cliecod C 8
cliente C 40
Estou usando o clipper52e, FW2.4, blinker 6...
A indexação no campo cliente está OK.
Mas a indexação no campo cliecod não enxerga todos os registros...
O problema não de ve ser da rotina, pois quando atinge um determinado numero de registros funciona normalmente...
Segue as linhas de compilação e linker... e a rotina de indexação....
compilação e linker....................................
clipper iptu -M -N
clipper imprime -M -N
clipper printer -M -N
clipper rpreview -M -N
clipper tdosprn -M -N
clipper cliente -M -N
clipper ruas -M -N
clipper imovel -M -N
clipper tabela -M -N
clipper funcoes -M -N
clipper cob -M -N
pause
blinker fi iptu,imprime,printer,rpreview,tdosprn,cliente,ruas,imovel,funcoes,tabela,cob,mpar @Fivewin.lnk
......................................................
Fivewin.lnk ...........................
LINKER INCREMENTAL OFF
BLINKER CLIPPER SYMBOL OFF
BLINKER EXECUTABLE COMPRESS
MAP A,S
BLINKER LINK VERSION 6.0
PACKCODE
PACKDATA
DEFBEGIN
name FiveWin
description 'Clipper for Windows library'
exetype Windows 3.1
code moveable discardable
data preload moveable
stacksize 9500
heapsize 2048
segment 'PLANKTON_TEXT' nondiscardable
segment 'EXTEND_TEXT' nondiscardable
segment 'OM_TEXT' nondiscardable
segment 'OSMEM_TEXT' nondiscardable
segment 'SORTOF_TEXT' nondiscardable
segment 'STACK_TEXT' nondiscardable
DEFEND
NOBELL
SEARCH Five, FiveC, Objects
LIB WinApi, Clipper, Extend, Dbfcdx, Dbfntx, Terminal
rotina de Indexação.................
oText:SetText("Classificando Clientes...")
Ferase("clientes.cdx")
** // BD Clientes
IF Use_Arq("clientes",.F.,.F.)
oMeter:nTotal:= cli->(LastRec()*2)
PACK
INDEX ON cliecod TAG codigo TO clientes EVAL{||oMeter:Set(cli->(Recno() ))} EVERY 5
INDEX ON cliente TAG nome TO clientes EVAL{||oMeter:Set(cli->(cli->(LastRec())+Recno() ))} EVERY 5
ENDIF
CLOSE DATA
........................................
Espero que possam me ajudar....
PS: No sistema quanto uso o tag nome, o dbseek acha o registro solicitado.... já quando uso o TAG codigo o dbSeek não encontra.. (é como se não existisse o registro)..
Estou com problemas na indexação usando o dbfcdx..... Tenho um indice com (02) dois TAG's... cliecod e cliente... segue a estrutura do arquivo:
CAMPO TIPO TAMANHO
cliecod C 8
cliente C 40
Estou usando o clipper52e, FW2.4, blinker 6...
A indexação no campo cliente está OK.
Mas a indexação no campo cliecod não enxerga todos os registros...
O problema não de ve ser da rotina, pois quando atinge um determinado numero de registros funciona normalmente...
Segue as linhas de compilação e linker... e a rotina de indexação....
compilação e linker....................................
clipper iptu -M -N
clipper imprime -M -N
clipper printer -M -N
clipper rpreview -M -N
clipper tdosprn -M -N
clipper cliente -M -N
clipper ruas -M -N
clipper imovel -M -N
clipper tabela -M -N
clipper funcoes -M -N
clipper cob -M -N
pause
blinker fi iptu,imprime,printer,rpreview,tdosprn,cliente,ruas,imovel,funcoes,tabela,cob,mpar @Fivewin.lnk
......................................................
Fivewin.lnk ...........................
LINKER INCREMENTAL OFF
BLINKER CLIPPER SYMBOL OFF
BLINKER EXECUTABLE COMPRESS
MAP A,S
BLINKER LINK VERSION 6.0
PACKCODE
PACKDATA
DEFBEGIN
name FiveWin
description 'Clipper for Windows library'
exetype Windows 3.1
code moveable discardable
data preload moveable
stacksize 9500
heapsize 2048
segment 'PLANKTON_TEXT' nondiscardable
segment 'EXTEND_TEXT' nondiscardable
segment 'OM_TEXT' nondiscardable
segment 'OSMEM_TEXT' nondiscardable
segment 'SORTOF_TEXT' nondiscardable
segment 'STACK_TEXT' nondiscardable
DEFEND
NOBELL
SEARCH Five, FiveC, Objects
LIB WinApi, Clipper, Extend, Dbfcdx, Dbfntx, Terminal
rotina de Indexação.................
oText:SetText("Classificando Clientes...")
Ferase("clientes.cdx")
** // BD Clientes
IF Use_Arq("clientes",.F.,.F.)
oMeter:nTotal:= cli->(LastRec()*2)
PACK
INDEX ON cliecod TAG codigo TO clientes EVAL{||oMeter:Set(cli->(Recno() ))} EVERY 5
INDEX ON cliente TAG nome TO clientes EVAL{||oMeter:Set(cli->(cli->(LastRec())+Recno() ))} EVERY 5
ENDIF
CLOSE DATA
........................................
Espero que possam me ajudar....
PS: No sistema quanto uso o tag nome, o dbseek acha o registro solicitado.... já quando uso o TAG codigo o dbSeek não encontra.. (é como se não existisse o registro)..