Clipper On Line • Ver Tópico - Novo ADORDD
Página 1 de 2

Novo ADORDD

MensagemEnviado: 29 Out 2015 15:38
por AHF
Novo adordd disponivel em https://github.com/AHFERREIRA/adordd.git.

Com este rdd as n/ aplicações sáo convertidas em SQL através do uso de ADO puro em alguns minutos mais o tempo de upload das tabelas.

Este rdd é 100% compativel com rdds do tipo dbfcdx sendo a sua compatibilidade superior ao ADS rdd.
As aplicações convertidas não necessitam de qualquer alteração no codigo.

1) ler o ficheiro 01_readme.pdf e adicionar adordd.prg ao projecto actual.

2) Colocar este código com os dados da app a converter no proc ou func inicial.

RddRegister("ADORDD",1) 
RddSetDefault("ADORDD")

IF RDDSETDEFAULT() == "ADORDD"

    SET ADODBF TABLES INDEX LIST TO { ....... }
    SET ADO TEMPORAY NAMES INDEX LIST TO {"TMP","TEMP"}
    SET ADO INDEX UDFS TO {"IF","&","SUBSTR","==","DESCEND"} //at least these must be in and our Udfs

    SET ADO DEFAULT RECNO FIELD TO "HBRECNO"
   // SET ADO FIELDRECNO TABLES LIST TO {...}
    SET ADO DEFAULT DELETED FIELD TO "HBDELETE"
    //SET ADO FIELDDELETED TABLES LIST TO {.... }

    SET ADO LOCK CONTROL SHAREPATH TO  "******" RDD TO "DBFCDX"
    SET ADO FORCE LOCK ON //might be off

    SET ADO DEFAULT DATABASE TO "******" SERVER TO "*****"  ENGINE TO "MYSQL" USER TO "****" PASSWORD TO "*****"
    SET ADO TABLENAME WITH PATH ON
    SET ADO CACHESIZE TO 50 ASYNC ON ASYNCNOWAIT ON

    //MSGINFO("PRE OPEN")
    SET ADO PRE OPEN THRESHOLD TO 3000
   // MSGINFO("PRE OPEN END")

    SET AUTOPEN OFF //can be on

    //comment this line after first execution to be faster
    //if  you dot comment it every execution will check if all tables have been loaded and because lOverwrite is .F.
    //do nothing
    hb_AdoUpload( "c:\yourdatabasepathroot\, "your actual rdd", "for ex MYSQL", .F. )

ENDIF


3) Compilar e linkar. Somente o adordd.prg e o prg onde colocaram este código são recompilados.

4) Para reverterem a v/ aplicação para o estado anterior só têm de comentar rddregister e reesetdefault e reconstruir a app.

Podem testar na v/ real aplicação. Não trabalha bem ? Nao gostaram ? Sigam o ponto 4.

Se mais tarde quiserem usar USE ... WHERE ... entáo têm de incluir o adordd.ch no v/projecto e aí todos os prgs serão recompilados.

Antonio H Ferreira

Novo ADORDD

MensagemEnviado: 13 Nov 2015 18:05
por AHF
New build adordd ver 1.0 at https://github.com/AHFERREIRA/adordd.git

Corrected bugs:

Logical fields array initialization.
scoped relations Scopes were not cleared when clear relation.
Eof and Bof vars were not being reset correctly by gotop and gobottom.

Changes:

1) New SET ADO TABLES DECIMAL FIELDS LIST TO....
Some engines like Access and SQlLite do not have specifically fields with decimal notation.
In these cases it was defaulting to 2 decimal places where could be more.
If the app would picture the gets with the fielddec function the nr of decimals places that could be entered
was only 2 although might be more.
With this set we let adordd knows the nr of decimals places per table and field.
When uploading tables that is done auto by adordd like for logical fields.
If you work with an engine that supports notation of decimals per field you might forget this set.

Novo ADORDD

MensagemEnviado: 16 Nov 2015 12:14
por AHF
New build adordd ver 1.0 at https://github.com/AHFERREIRA/adordd.git

Corrected bugs:

DBCREATE if table exists just overwite it like in any other rdd. It was giving a error.

hb_AdoRddFile( cFile ) if rddsetdefault == "adordd" it test if file exist in DB
otherwise it passes to normal FILE() function.So you can use it for all cases with or without adordd.

When SET ADO DATABASE TO... cant open connection instead of quiting app it throw error 10500.

Changes:

SET ADO PRE OPEN THRESHOLD TO <nRecords> [ MASK <aMask> ]
Added new option MASK that allow to pre open recordsets containing nrecords and with value MASK in table name.

Novo ADORDD

MensagemEnviado: 20 Nov 2015 10:02
por AHF
New build adordd ver 1.0 at https://github.com/AHFERREIRA/adordd.git

Corrected bugs:

APPEND with SQLITE, FIREBIRD, POSTGRE and ORACLE with index with UDF or condition was
adding the same bookmark twice.

ADO_REQUERY could fall into recursive calls after append new record using engines
Sqlite, FireBird Postgre and Oracle.

DBGOTO was giving error if the record was not within INDEX with UDF or condition.

Changes:

hb_AdoRddFile( cFile ) Check for index file in the adodbf index list... and support for Sqlite, Firebird, Oracle.

Novo ADORDD

MensagemEnviado: 26 Nov 2015 14:50
por AHF
New build adordd ver 1.0 at https://github.com/AHFERREIRA/adordd.git

Corrected Bugs:

1) FIELDNAME was not returning upper fieldname in case of db engine PostGre, Oracle

2) Some upper case conversions to take care of lower case fields used by PostGre and Oracle.

3) Reserved keywords used in fields taken care with PostGre and Oracle.

4) SET TRESHOLD was not finding aMask if used table and SQL were with different case. Now all upper case.

5) Pre opening of recorsets optimized and cached for different where clauses on same table.
If the table its below the SET THRESHOLD and its already opened in another work area the set its not created again but cloned from that work area.
If during app run time a table passes the SET THRESHOLD value its cached next time is opened.

Tested engines:

ACCESS
ADS
DBASE
FIREBIRD
FOXPRO
MS SQL
MYSQL
POSTGRE
SQLITE

Still not tested but should work ok:

ANYWHERE
INFORMIX
MARIADB
ORACLE

Novo ADORDD

MensagemEnviado: 07 Dez 2015 09:59
por AHF
New build adordd ver 1.0 at https://github.com/AHFERREIRA/adordd.git

New:

1) SET ADODBF INDEX LIST FIELDTYPE NUMBER TO {{ "Table",{ "numfiled", nlen },{"numfield", nLen } } }
adordd need a precise indication of the len of numeric fields used in index expressions.
This is only needed for numeric fields where the SQL type its without field len definition such as:
AUTOINC, MONEY, DOUBLE, INT, SMALLINT, etc.

Corrected Bugs:

1) ADOBEGINTRANS( nWA ) : without work are it starts a transaction in default adordd connection otherwise
it starts in the connection of the current work area.

2) ADOROLLBACKTRANS( nWA ) : without any work area it rolls back all transactions in all open connections
otherwise it rolls back transaction in same connection as that work area.

3) ado_create was adding an extra position in field len of numeric fields
now ADO_FIELDSTRUCT takes that position returning the correct len of a field type "N"
This could lead to side effects in INDEXKEY where the numeric field was part of the expression.
No tables structure corrections are necessary.

4) ADPSEUDOSEEK works now ok with fields type "T"

5) ADODUFINDEX if result of the index expression its numeric its considered as it was a UDF expression
because we cant extract field len to build a find, filter or query expression because the eval result
its the sum of all the numeric fields in the expression.

6) ORDKEYGOTO was not full implemented.

Novo ADORDD

MensagemEnviado: 23 Dez 2015 08:51
por sygecom
Alguém usando ADORDD?

Novo ADORDD

MensagemEnviado: 23 Jan 2016 22:20
por JoséQuintas
Eu continuo usando minha classe mesmo.
Nada contra, essa ADORDD é bem superior à que ainda existe no Harbour.

Novo ADORDD

MensagemEnviado: 31 Jan 2016 21:45
por sygecom
A parte chata que não consegui contornar é ter que instalar os drivers do ODBC em cada maquina que for usar o sistema, já no SQLRDD o uso nativo através da DLL deixa tudo mais fácil.
Ainda procuro uma solução para poder sair do xharbour que dependo do SQLRDD ainda.

Novo ADORDD

MensagemEnviado: 31 Jan 2016 23:00
por JoséQuintas
Até que não é problema, já que o usuário pode clicar lá no next, next, next.
O ruim é quando a máquina está em domínio, e precisa do administrador.

Tem o SQLMIX também, que permite de tudo, como se fossem todas as RDDs em uma só.
Pode ser complicado o início, justamente porque envolve configurar mais de uma coisa de uma vez.
Mas não cheguei a usar.

Mas se não me engano tem a SQLRDD pra Harbour, não grátis.

Novo ADORDD

MensagemEnviado: 31 Jan 2016 23:05
por JoséQuintas

Novo ADORDD

MensagemEnviado: 01 Fev 2016 11:41
por sygecom
Uso esse ai e muito, problema é que em alguns caso o SQLRDD ainda consegue ser mais rápido nas pesquisas, ele consegue fazer internamente algum tipo de paginação que não consigo simular usando SQLWIN.

Novo ADORDD

MensagemEnviado: 01 Fev 2016 22:33
por JoséQuintas
Não sei que tipo de configuração essas RDDs usam.
Talvez faça alguma diferença alterar a configuração.

Novo ADORDD

MensagemEnviado: 10 Fev 2016 17:30
por sergio.kondo
Leonardo,

Este SQLWin é um produto acabado? Me lembro quando o projeto nasceu e em pouco tempo foi interrompido.

Atenciosamente,
Sérgio Kondo

Novo ADORDD

MensagemEnviado: 10 Fev 2016 18:48
por sergio.kondo
Antônio

Fiz download da ADORDD e tentei compilar o TryAdoRdd.prg junto como o AdoRdd.prg. E neste último faz uso da UR_SUPER_ERROR() e outras UR_xxx() que não encontrei em nenhum dos arquivos que baixei.

Como baixo o programa/lib onde estão definidas essas funções?

Atenciosamente,
Sérgio Kondo

Novo ADORDD

MensagemEnviado: 11 Fev 2016 06:28
por AHF
Sergio,

Verifique por favor a versão de hbusrrdd.ch.

Antonio

Novo ADORDD

MensagemEnviado: 12 Fev 2016 12:29
por sygecom
Olá Antonio,

Será que teria alguma forma de identificar se no computador que vai abrir o sistema(usando adordd) se tem o Driver de conexão instalado e, se caso não tiver configurado fazer essa configuração automaticamente?

Igual faz SR_InstallDSN() do SQLRDD ?

Novo ADORDD

MensagemEnviado: 12 Fev 2016 23:16
por JoséQuintas
DSN é outra coisa, que muita gente até acha ser obrigatório.
DSN é criar uma conexão pré-definida, porque às vezes o administrador pode querer/precisar limitar o uso.
Isso acontece principalmente em hospedagem de sites.

Testar se está instalado é possível, instalar automático já não sei se dá.
Pode cair na questão de segurança.

Novo ADORDD

MensagemEnviado: 13 Fev 2016 08:43
por sygecom
JoséQuintas escreveu:Testar se está instalado é possível, instalar automático já não sei se dá.
Pode cair na questão de segurança.


Poderia me postar algum caminho ? estou precisando muito disso !

Novo ADORDD

MensagemEnviado: 13 Fev 2016 09:21
por JoséQuintas
No começo usava isto, pra encontrar a string na lista de drivers, mas não deu certo pra todas as versões.
Depois deixei sem teste mesmo, mas deixei como anotação no fonte.
Usa pra conexão qualquer versão de ODBC instalado na máquina, por isso precisava saber a versão.

   //acMySql := { "{MySQL ODBC 3.51 Driver}" }
   // , "{MySQL ODBC 5.1 Driver}", "{MySQL ODBC 5.2 ANSI}", "{MySQL ODBC 5.2w}" } // o segundo ficou esquisito pra rede local

   //cMySqlDriver := acMySql[ 1 ]
   //FOR nCont = 1 TO Len( acMySql )
   //   cRegistroText := Win_RegRead( "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers\" + acMySql[ nCont ] )
   //   IF cRegistroText != NIL
   //      IF cRegistroText == "Installed"
   //         cMySqlDriver := acMySql[ nCont ]
   //      ENDIF
   //   ENDIF
   //NEXT

Novo ADORDD

MensagemEnviado: 14 Fev 2016 00:11
por sergio.kondo
AHF escreveu:Sergio,

Verifique por favor a versão de hbusrrdd.ch.

Antonio


Antônio, use o que está na página de download. É este aqui:
$Id: hbusrrdd.ch 14673 2010-06-03 14:48:23Z vszakats $

Sérgio

Novo ADORDD

MensagemEnviado: 19 Fev 2016 20:28
por JoséQuintas
Antonio.
Tenho um cliente onde tem mistura do odbc mysql 3.51.11 e 3.51.30.
No 3.51.30 a propriedade .definedsize retorna o valor correto, mas no 3.51.11 não.
Tem como contornar isso sem ter que trocar o odbc?
É que por ser domínio, não é tão simples remover o odbc anterior.
Somente instalar o "mais novo" não resolve.