Página 1 de 2

Novos tipos de FIELDS, SIX novos recursos.

Enviado: 25 Set 2007 09:08
por Itamar M. Lins Jr.
Ola Grupo.

O Przemek adicionou mais recursos no harbour.
Só quero ver o exemplo de como funcionar e usar esses fields, em quais situações devemos usa-los. :-)
O auto incremento é muito bom, acaba com a preocupação de ficar criando códigos para alguns tipos de cadastros por exemplo clientes.

Alguem do grupo usa o SIX com harbour para fazer uns testes?

Se eu entedi direito posso usar esses comando com CDX é isso?

E o o Miguel está portando para o xharbour.

* harbour/source/rdd/delim1.c
* changed HB_IT_* as field type to HB_FT_*
+ added field flags HB_FF_*
+ added support for new field types to core code

* harbour/source/rdd/dbf1.c
+ added support for AUTOINC (+), ROWVERSION (^), TIME (T), DAYTIME (@)
and MODTIME (=) fields

* harbour/contrib/rdd_ads/ads1.c
* harbour/contrib/rdd_ads/ace.h
+ added support for ROWVERSION (^), and MODTIME (=) fields
+ harbour/include/hbsix.ch
* harbour/source/rdd/hbsix/Makefile
* harbour/source/rdd/hbsix/sxdate.c
* harbour/source/rdd/hbsix/sxcompr.c
* harbour/source/rdd/hbsix/sxcrypt.c
+ harbour/source/rdd/hbsix/sxsem.c
+ harbour/source/rdd/hbsix/sxord.c
+ harbour/source/rdd/hbsix/sxredir.c
+ harbour/source/rdd/hbsix/sxfname.c
+ harbour/source/rdd/hbsix/sxtable.c
+ harbour/source/rdd/hbsix/sxutil.c
+ harbour/source/rdd/hbsix/sxcompat.prg
+ harbour/source/rdd/hbsix/sxtrig.prg
+ harbour/source/rdd/hbsix/sxini.prg
+ added SIx3 compatible functions:
RDD_Count(), RDD_Name(), RDD_Info(), SetRDD(),
sxChar(), sxNum(), sxDate(), sxLog(),
Sx_DToP(), Sx_PToD(),
Sx_BLOB2File(), Sx_File2BLOB(),
Sx_Compress(), Sx_Decompress(),
Sx_FCompress(), Sx_FDecompress(),
Sx_AutoOpen(), Sx_AutoShare(),
Sx_MemoExt(), Sx_MemoBlk(), Sx_SetMemoBlock(), Sx_MemoPack(),
Sx_SetTrigger(), Sx_SetTrig(), Sx_DefTrigger(),
Sx_INIheader(), _sx_INIinit(), _sxOpenInit(),
Sx_SetPass(),
Sx_Encrypt(), Sx_Decrypt(), Sx_DBFdecrypt(), Sx_DBFencrypt(),
sx_MakeSem(), sx_KillSem(), sx_IsSem(),
Sx_ClrScope(), Sx_SetScope(),
Sx_Freeze(), Sx_Warm(), Sx_Chill(), Sx_Thermometer(),
Sx_IsReindex(), Sx_Step(), Sx_KeysIncluded(),
Sx_I_IndexName(), Sx_I_TagName(),
Sx_IndexCount(), Sx_IndexName(), Sx_IndexType(), Sx_IndexFilter(),
Sx_ROXLock(), Sx_ROXUnLock(), Sx_IsMyROX(), Sx_IsROXLock(),
Sx_KeyAdd(), Sx_KeyDrop(), Sx_KeyData(),
Sx_KeySkip(), Sx_KeyCount(), Sx_KeyNo(), Sx_KeyGoto(),
Sx_WildSeek(), Sx_WildMatch(),
Sx_IsFLocked(), Sx_IsReadOnly(), Sx_IsShared(),
Sx_IsLocked(), Sx_IsDBT(),
Sx_IDtype(), Sx_TableType(), Sx_TableName(),
Sx_SetTurbo(), Sx_TurboArea(), Sx_SetDirty(), Sx_DirtyArea(),
Sx_RLock(), Sx_UnLock(), Sx_GetLocks(), Sx_LockRetry(),
Sx_SeekLast(), Sx_FindRec(),
Sx_SkipUnique(), Sx_TagUnique(),
Sx_TagCount(), Sx_TagOrder(), Sx_TagNo(), Sx_TagName(),
Sx_TagInfo(), Sx_Tags(),
Sx_SetTag(), Sx_SetTagOrder(), Sx_SetTagNo(),
Sx_KillTag(),
Sx_FileOrder(), Sx_SetFileOrd(), Sx_ClearOrder(),
Sx_VSigLen(), Sx_VFGet(),
Sx_dbCreate(), Sx_StrxCheck(), Sx_Rollback(), Sx_SortOption(),
_sxCondSet(),
Sx_FNameParser(), Sx_SlimFast(),
Sx_Version(), Sx_Error(),

+ added SIx3 compatible commands:
SET DIRTYREAD ON|OFF
USE ... [TRIGGER <cTrigger>] [PASSWORD <cPassword>]
SORT ... USECURRENT
WILDSEEK <str>
WILDSEEKNEXT <str>
CLEAR ORDER <order>
SET TAGORDER TO [<order>]
SET ORDER TO TAG <(tag)> [OF <(bag)>]
SET TAG TO [<tag> [OF <(bag)>]]
REINDEX OPTION <eval> [STEP <step>]
DELETE TAG <(tag1)> [OF <(bag1)>] [, <(tagN)> [OF <(bagN)>]]
DELETE TAG ALL [OF <(bag)>]
CLEAR SCOPE
SET SCOPETOP TO [<value>]
SET SCOPEBOTTOM TO [<value>]
SET SCOPE TO [<value>]
SET TURBOREAD ON|OFF
MEMOPACK [BLOCK <size>] [OPTION <opt> [STEP <step>]]
SET MEMOBLOCK TO <value>
SUBINDEX ON <key> TO <(file)> ;
[OPTION <eval> [STEP <every>]] [FILTERON] [EMPTY]
SUBINDEX ON <key> TAG <(tag)> [OF <(bag)>] [TO <(bag)>] ;
[OPTION <eval> [STEP <every>]] [FILTERON] [EMPTY]
INDEX ON <key> [TAG <(tag)>] TO <(bag)> ;
[OPTION <eval> [STEP <every>]] [FILTERON] [EMPTY] [SUBINDEX]
INDEX ON <key> TAG <(tag)> [OF <(bag)>] [TO <(bag)>] ;
[OPTION <eval> [STEP <every>]] [FILTERON] [EMPTY] [SUBINDEX]

Unlike Ads*() functions the Sx_*() ones can be used with any RDD
and will work if RDD supports necessary functionality.

The global settings in SIx3 are RDD dependent in Harbour, f.e.
in SIx3 Sx_MemoExt() change MEMO file extensions in all SIX* RDDs
but in Harbour only in default RDD driver.
In Harbour default trigger function "Sx_DefTrigger" is not
enabled by default. If user needs such functionality then he
has to enable it himself using
rddInfo( RDDI_TRIGGER, "SX_DEFTRIGGER", [<cRDD>] )
f.e. this code:
init procedure sx_inittrig()
local aRDDs := { "DBF", "DBFNTX", "DBFCDX", "SIXCDX", ;
"RMDBFNTX", "RMDBFCDX" }
local aRDDList := RddList(), cRdd

for each cRdd in aRDDs
if ascan( aRDDList, { |x| x == cRdd } ) != 0
rddInfo( RDDI_TRIGGER, "SX_DEFTRIGGER", cRDD )
endif
next
return
sets SX_DEFTRIGGER as default trigger in DBF* based RDDs.

I still do not allow to encrypt tables with memo fields to not
replicate SIx3 bugs which may cause data corruption.

Enviado: 25 Set 2007 15:10
por sygecom
Alguem do grupo usa o SIX com harbour para fazer uns testes?
Eu não uso mas tem muita gente que usa o clipper com SIX e as vez fica com medo de migrar para harbour ou xharbour...tudo que for para ajudar para o pessoal migrar é bom....
Se eu entedi direito posso usar esses comando com CDX é isso?
Acho que não pode, vou fazer uns teste e depois retorno aqui....mas mesmo assim isso tah ficando muito bom...

Enviado: 03 Nov 2007 13:44
por sygecom
Foi incluido no xharbour no dia 31/10/2007 por Miguel Angel Marchuet.

Enviado: 03 Nov 2007 17:20
por Luciano Bonfim
Desculpa minha ignorância, mas oque é esse SIX? oque ele faz?

Eu uso DBFCDX no xharbour

Enviado: 03 Nov 2007 17:33
por sygecom
É um RDD que é muito usado no clipper, e que esta sendo implantado no harbour e no xharbour....

Enviado: 03 Nov 2007 17:53
por sygecom
Se eu entedi direito posso usar esses comando com CDX é isso?
Fiz os teste no xharbour, com duas funções da SIX no CDX e funcinou certinho !!!

Enviado: 03 Nov 2007 19:32
por clodoaldomonteiro
Olá!
Pelos testes de vocês, existe algun RDD que é mais rápido que outros?

Converti um sistema de contabilidade pública para o xharbour e o processamento geral que faço no meu sistema ficou 20% mais lento no xharbour. É um processamento que abro várias tabelas e saio abrindo registros novos em uma tabela e depois atualizando um plano de contas.

Tem como acelarar esse processos no xharbour?

Enviado: 03 Nov 2007 19:43
por sygecom
vc esta usando modo console ? já tentou linkar alguma lig grafica junto, como a GTWVT ou GTWVW ? ...eu estou usando CDX e ficou muito mais rapido que no clipper, e agora com MYSQL, tah mais seguro.

Novos tipos de FIELDS, SIX novos recursos.

Enviado: 09 Out 2019 10:22
por clodoaldomonteiro
Bom dia,
sygecom escreveu:vc esta usando modo console ? já tentou linkar alguma lig grafica junto, como a GTWVT ou GTWVW ? ...eu estou usando CDX e ficou muito mais rapido que no clipper, e agora com MYSQL, tah mais seguro.
Uso o xHarbour 1.00 MinGW + GTWVW + BCC 5.82 com RDD CDX, mas quanto mais as tabelas aumentam mais lento ficam os filtros.
Vi em algumas postagens aqui que o Drive RDD ajuda muito na aceleração do SET FILTER, mas a solução mais rápida está sob domínio da xHarbour.com.
E realmente a CDX é bem mais rápida e confiável que a padrão NTX e sei que no mundo da informática, o céu é o limite.

Novos tipos de FIELDS, SIX novos recursos.

Enviado: 09 Out 2019 19:57
por JoséQuintas
NÃO SEI se a esta altura do campeonato vale a pena mas.....
Tem ADO e ADS Local.
Pode usar simultâneo, somente nessas telas com filtro e ver se o resultado é bom.

Novos tipos de FIELDS, SIX novos recursos.

Enviado: 09 Out 2019 20:04
por JoséQuintas
Só pra lembrar:

Código: Selecionar todos

cSql = "select " & _
   "cnDatEmi DtEmissao, " & _
   "count(*) CtrcQtd, " & _
   "Sum(cnPeso) CtrcPeso, " & vbCrLf & _
   "Sum(cnValor) CtrcValor, " & _
   "Sum(cnVlMerc) ValorMerc, " & _
   "0 CFQtd, " & vbCrLf & _
   "0 CFValor, " & _
   "0 ColetaQtd, " & _
   "0 ColetaVlr, " & vbCrLf & _
   "0 ColVlMerc " & vbCrLf & _
   "into lixo " & _
   "From gtconhe group by DtEmissao "
cSql = cSql & _
   "union all " & vbCrLf & _
   "select cfDatEmi DtEmissao, " & _
   "0 CtrcQtd, " & _
   "0 CtrcPeso, " & vbCrLf & _
   "0 CtrcValor, " & _
   "0 ValorMerc, " & _
   "count(*) CFQtd, " & vbCrLf & _
   "Sum(CFValor) CfValor, " & _
   "0 ColetaQtd, " & _
   "0 ColetaVlr, " & vbCrLf & _
   "0 ColVlMerc " & vbCrLf & _
   "From gtcontr group by DtEmissao "
cSql = cSql & vbCrLf & _
   "union all " & _
   "Select " & _
   "ceDatEmi DtEmissao, " & _
   "0 CtrcQtd, " & vbCrLf & _
   "0 CtrcPeso, " & _
   "0 CtrcValor, " & _
   "0 ValorMerc, " & vbCrLf & _
   "0 CFQtd, " & _
   "0 CFValor, " & _
   "Count(*) ColetaQtd, " & vbCrLf & _
   "Sum(ceValFat) ColetaVlr, " & _
   "Sum(jpnftr1.ntValor) ColVlMerc " & vbCrLf & _
   "from jpordem " & _
   "left join jpnftr1 on jpordem.ceNumLan = jpnftr1.ntColeta " & _
   "group by DtEmissao " & vbCrLf
   Set Rs = RsFromConexao(cnConn, cSql)
   Rs.Close
   cnConn.Close
   cSql = "select DtEmissao, Sum(CtrcQtd) CtrcQtd, Sum(CtrcPeso) CtrcPeso,  " & _
   "Sum(CtrcValor) CtrcValor, Sum(ValorMerc) ValorMerc, " & vbCrLf & _
   "Sum(CFQtd) CFQtd, Sum(CFValor) CFValor, " & _
   "Sum(ColetaQtd) ColetaQtd, Sum(ColetaVlr) ColetaVlr, Sum(ColVlMerc) ColVlMerc " & _
   "from lixo group by DtEmissao order by DtEmissao Desc "
   Set Rs = RsFromConexao(cnConn, cSql)
   Set MSHFlexGrid2.DataSource = Rs
   Rs.Close
   cnConn.Close
   cSql = "select Year(DtEmissao)*100+Month(DtEmissao) Mes, " & _
   "Sum(CtrcQtd) CtrcQtd, Sum(CtrcPeso) CtrcPeso,  Sum(CtrcValor) CtrcValor, Sum(ValorMerc) ValorMerc, " & vbCrLf & _
   "Sum(CFQtd) CFQtd, Sum(CFValor) CFValor, " & vbCrLf & _
   "Sum(ColetaQtd) ColetaQtd, Sum(ColetaVlr) ColetaVlr, Sum(ColVlMerc)ColVlMerc " & _
   "from lixo group by Mes order by Mes Desc "
   Set Rs = RsFromConexao(cnConn, cSql)
   Set MSHFlexGrid1.DataSource = Rs
   Grafico1.Title = "Comparativo CTRCs/Coletas/CFs"
Isso eu usava no Visual Basic 6, acessando por ODBC ADS Local (grátis) os DBFs, simultâneo ao Clipper.
Se fosse em Clipper ficaria horas pra processar isso daí.
Se fosse hoje, o filtro seria por intervalo de data mesmo, e não com essa gambiarra.
Seria muito mais rápido ainda.

Novos tipos de FIELDS, SIX novos recursos.

Enviado: 10 Out 2019 09:12
por Itamar M. Lins Jr.
Ola!
mas quanto mais as tabelas aumentam mais lento ficam os filtros.
Com tantos recursos melhores, pra quê usar filtro ?
A pessoa tá trabalhando com DBF gigantes(relato no forum internacional) (limite do OS) Eles mudaram para Harbour 64bits, estendendo ainda mais.
Max record size: 2^16-1 = 65535 byts ( 64 MB )
Max number of recors : 2^32-1 = 4,294,967,295 ( 4 Bilion )
Max .dbf file size : 2^48 = 256 TB
Max DBT memo file size : 2 TB
Max FPT memo file size : 256 GB
Max SMT memo file size : 128 GB
Max NTX file size (standard) : 4GB
Max NTX file size (incresead ) : 4TB
Max CDX file size : 4GB
2014-10-17 14:55 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbrddcdx.h
* src/rdd/dbfcdx/dbfcdx1.c
+ added support for large index files over 4GB length.
These are slightly modified CDX indexes which stores index page numbers
instead of index page offsets inside index file. This trick increase
maximum index files size from 2^32 (4GB) to 2^41 (2TB). This index
format is enabled automatically when DB_DBFLOCK_HB64 is used. This is
the same behavior as in DBFNTX and DBFNSX for which I added support
for large indexes (up to 4TB) few years ago.
Warning: new CDX indexes are not backward compatible and cannot be
read by other systems or older [x]Harbour versions.
If you try to open new indexes using older [x]Harbour RDDs
then RTE "DBFCDX/1012 Corruption detected" is generated.
When current Harbour *DBFCDX/SIXCDX RDD open index file
then it automatically recognize type of index file so it
will work correctly with both versions without any problem.
In short words: People using DB_DBFLOCK_HB64 should remember
that after reindexing with new Harbour applications old ones
cannot read new CDX indexes.
; In next step I plan to add support for user defined page size in CDX
index files.
Saudações,
Itamar M. Lins Jr.

Novos tipos de FIELDS, SIX novos recursos.

Enviado: 10 Out 2019 10:13
por Ranier
clodoaldomonteiro escreveu:Bom dia,
sygecom escreveu:vc esta usando modo console ? já tentou linkar alguma lig grafica junto, como a GTWVT ou GTWVW ? ...eu estou usando CDX e ficou muito mais rapido que no clipper, e agora com MYSQL, tah mais seguro.
Uso o xHarbour 1.00 MinGW + GTWVW + BCC 5.82 com RDD CDX, mas quanto mais as tabelas aumentam mais lento ficam os filtros.
Vi em algumas postagens aqui que o Drive RDD ajuda muito na aceleração do SET FILTER, mas a solução mais rápida está sob domínio da xHarbour.com.
E realmente a CDX é bem mais rápida e confiável que a padrão NTX e sei que no mundo da informática, o céu é o limite.
Para que ficar limitado aos dbfs?

PostgreSQL Limites:
database size unlimited
number of databases 4,294,950,911
relations per database 1,431,650,303
relation size 32 TB with the default BLCKSZ of 8192 bytes
rows per table limited by the number of tuples that can fit onto 4,294,967,295 pages
columns per table 1600 further limited by tuple size fitting on a single page; see note below
field size 1 GB
identifier length 63 bytes can be increased by recompiling PostgreSQL
indexes per table unlimited constrained by maximum relations per database
columns per index 32 can be increased by recompiling PostgreSQL
partition keys 32 can be increased by recompiling PostgreSQL

Migre para PostgreSQL e seja feliz...

Novos tipos de FIELDS, SIX novos recursos.

Enviado: 10 Out 2019 10:46
por clodoaldomonteiro
Bom dia Ranier,

O próximo passo é usar justamente o PostGreSQL, e vai ser uma mudança bem contundente, pra falar a verdade, nem sou eu quem vai fazer, é minha equipe de programadores que vai assumir essa tarefa.

Mas o tempo de migrar nunca é como planejamos e tive que ficar dando manutenção nos sistemas antigos que ainda rodam nos clientes.

Grato pela atenção.

Novos tipos de FIELDS, SIX novos recursos.

Enviado: 10 Out 2019 10:55
por Ranier
Bom dia.
Posso dizer sem sombras de dúvidas que o melhor Banco de Dados da atualidade, tanto comercial, quanto livre.
Supera o Oracle, em números recursos. Tanto que agora, quem corre atrás é o pessoal da Oracle, para tentar acompanhar. A Rússia em peso migrou do Oracle para o PostgreSQL.