FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Nuevo FWH 16.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Nuevo FWH 16.06
Posted: Sun Aug 07, 2016 07:04 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Nuevo FWH 16.06
Posted: Sun Aug 07, 2016 11:08 AM

Por favor, descargue el fichero para usar el ejemplo mnu01.prg
Please download file image for use mnu01.prg sample

https://bitbucket.org/fivetech/fivewin- ... etechv.png

y ejemplo actualizado
and sample updated

https://bitbucket.org/fivetech/fivewin- ... /mnu01.prg

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Nuevo FWH 16.06
Posted: Tue Aug 16, 2016 10:34 AM

FWH 16.06 build 2 ya est谩 disponible:

viewtopic.php?p=193101#p193101

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 133
Joined: Mon May 12, 2008 04:13 PM
Re: Nuevo FWH 16.06
Posted: Wed Aug 31, 2016 05:28 AM
Maestro Antonio

1. libmysql.dll en 32bits y 64bits se debe llamar as矛 hay que cambiar de nombre a libmysql64.dll por libmysql.dll para poder trabajar en 64bits existe alguna manera de trabajar con libmysql.dll y libmysql64.dll en la misma carpeta asi como se trabaja freeimage.dll y freeimage64.dll.

2. coloco un ejemplo sencillo donde cada vez que se revisa una procedimiento se incrementa la memoria, es como si no cerrara el oRcs coloco un ejemplo
cada vez que entra a CalCtaAntDH se incrementa la memoria.

Code (fw): Select all Collapse
聽 oRcs := oConexion:Query("Select * From MaesCont Order by NroAsi")
聽 聽 If oRcs==Nil
聽 聽 聽 聽 Return(.f.)
聽 聽 EndIf
聽 聽While !oRcs:Eof()

聽 聽 聽 聽 fNroAsi := oRcs:Fields("NROASI"):Value
聽 聽 聽 fFecAsi := oRcs:Fields("FECASI"):Value

聽 聽 聽 聽 fTotDeb := 0
聽 聽 聽 聽 fTotHab := 0 

聽 聽 聽 聽oRcsC := oConexion:Query("Select * From DetaCont Where NroAsi="+str(fNroAsi))
聽 聽 聽 聽 If oRcsC==Nil
聽 聽 聽 聽 聽 聽 Return(.f.)
聽 聽 聽 聽 EndIf
聽 聽 聽 聽 While !oRcsC:Eof()

聽 聽 聽 聽 聽 fCodCta := oRcsC:Fields("CODCTA"):Value
聽 聽 聽 聽fDebe 聽 := oRcsC:Fields("DEBE"):Value
聽 聽 聽 聽 fHaber 聽:= oRcsC:Fields("HABER"):Value

聽 聽 聽 聽 聽 聽 fTotDeb += fDebe
聽 聽 聽 聽 聽 聽 fTotHab += fHaber

聽 聽 聽 聽 聽 聽 CalCtaAntDH(fCodCta,fDebe,fHaber,"+")

聽 聽 聽 聽 聽 聽oRcsC:MoveNext()
聽 聽 聽 聽 EndDo

聽 聽 聽 聽 oRcs:Fields("TotDeb"):Value := fTotDeb
聽 聽 聽 聽 oRcs:Fields("TotHab"):Value := fTotHab

聽 聽 聽 聽 oRcs:Save()

聽 聽 聽 聽oRcs:MoveNext()
聽 聽 EndDo
//
Procedure CalCtaAntDH(fCodCta,fDebe,fHaber,fSumRes)

聽 聽 oRcsA := oConexion:Query("select * from cuentas where `codcta`='"+fCodCta+"'")
聽 聽 If oRcsA==Nil
聽 聽 聽 聽 Return(.f.)
聽 聽 EndIf
聽 聽 If !oRcsA:Eof()
聽 聽 聽 聽 If !Empty(fDebe)
聽 聽 聽 聽 聽 聽If fSumRes = "+"
聽 聽 聽 聽 聽 聽 聽 聽 oRcsA:Fields("Debe"):Value 聽+= fDebe
聽 聽 聽 聽 聽 聽 Else
聽 聽 聽 聽 聽 聽 聽 聽 oRcsA:Fields("Debe"):Value 聽-= fDebe
聽 聽 聽 聽 聽 聽 EndIf
聽 聽 聽 聽 EndIf

聽 聽 聽 聽 If !Empty(fHaber)
聽 聽 聽 聽 聽 聽If fSumRes = "+"
聽 聽 聽 聽 聽 聽 聽 聽 oRcsA:Fields("Haber"):Value += fHaber
聽 聽 聽 聽 聽 聽 Else
聽 聽 聽 聽 聽 聽 聽 聽 oRcsA:Fields("Haber"):Value -= fHaber
聽 聽 聽 聽 聽 聽 EndIf
聽 聽 聽 聽 EndIf

聽 聽 聽 聽 oRcsA:Save()
聽 聽 EndIf 聽 

聽 聽 oRcsA:Close()


El mismo resultado con la versi贸n 16.05 y 16.06

Nota: Con ADO no aumenta la memoria en procesos de windows, con ese mismo ejemplo
Fivewin 16.11
Harbour 3.2.0
Visual Studio 2015 community
MariaDb/MySql

Ing. MSc. Luis Duque
http://www.accasoft.net
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Nuevo FWH 16.06
Posted: Wed Aug 31, 2016 08:52 AM

Luis,

Si revisas la carpeta FWH\DLL ver谩s que estan ambas DLLs all铆, y el nombre de la de 64 bits termina el 64

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 133
Joined: Mon May 12, 2008 04:13 PM
Re: Nuevo FWH 16.06
Posted: Wed Aug 31, 2016 04:21 PM

Maestro Antonio

Si claro est谩, las dos librerias dll libmysql.dll y libmysql64.dll sin embargo cuando tengo mi aplicacion tanto de 32bits y 64bits en la misma carpeta copio las dos DLL, abro mi aplicacion en 32bits y perfecto el automaticamente abre la DLL libmysql.dll y funciona perfecto. El detalle es que al abrir mi aplicacion de 64bits da error porque el intenta es abrir libmysql.dll y no lo hace con libmysql64.dll, que sucede le cambio de nombre a libmysql64.dll por libmysql.dll abro de nuevo mi aplicacion y abre perfecto.. El error es que la DLL libmysql64.dll no la reconoce con ese nombre sino con libmysql.dll ese es el error, por eso hago la comparaci贸n con freeimage.dll y freeimage64.dll que se llaman bien cuando se abre una aplicacion en 32bits(freeimage.dll) y 64bits(freeimage64.dll).

Ahora lo otro importante es el aumento de memoria que se genera al abrir varias veces una tabla de mysql.

Muchas Gracias Maestro y estoy atento.

Fivewin 16.11
Harbour 3.2.0
Visual Studio 2015 community
MariaDb/MySql

Ing. MSc. Luis Duque
http://www.accasoft.net
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Nuevo FWH 16.06
Posted: Wed Aug 31, 2016 06:13 PM

Luis,

Se lo acabo de comentar a Mr. Rao para saber su opini贸n

Te mantendr茅 informado de lo que me conteste

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Nuevo FWH 16.06
Posted: Thu Sep 01, 2016 04:49 PM
My advice about DLLs

Copy fwh\dll\libmysql.dll as <exefolder>\libmysql.dll // 32-bit
Copy fwh\dll\libmariadb64.dll as <exefolder>\libmariadb.dll // for 64-bit

Build 32-bit application linking \fwh\lib\libmysql.lib
Build 64-but application linking \fwh\lib\libmariadb64.lib

Now both 32-bit and 64-bit Exes work from the same folder without renaming the dlls.
Please note that both libmysql.dll and libmariadb.dll are totally identical in functionality.

This is exactly what we have done for executing and testing out mysql samples in fwh\samples folder with all 32-bit and 64-bit compilers.


2. coloco un ejemplo sencillo donde cada vez que se revisa una procedimiento se incrementa la memoria, es como si no cerrara el oRcs coloco un ejemplo
cada vez que entra a CalCtaAntDH se incrementa la memoria.


Thank you. We are carefully examining the issue and do the needful soon.

New utility methods in 16.07:

We have provided new method:
Code (fw): Select all Collapse
METHOD UpdateSummary( cMaster, cMasKey, acMasCols,   ;
                      cTrnTable, cTrnKey, acTrnCols, ;
                      cTrnWhere, cOperator )

function MYSQL_UpdateSummarySQL( cMaster, cMasKey, acMasCols,   ;
                                 cTrnTable, cTrnKey, acTrnCols, ;
                                 cTrnWhere, cOperator )

to assist our users to easily accomplish the tasks as in the sample posted.
For instance, the above functionality can be accomplished by
Code (fw): Select all Collapse
oCn:UpdateSummary( "maescont", "nroasi", "totdeb,tothab", ;
                   "detacont", "nroasi", "debe,haber" )  )
oCn:UpdateSummary( "cuentas", "codcta", "debe,haber", ;
                   "detacont", "codcta", "debe,haber" )  )


Calling these methods internally generate the following SQL statements and execute.
Code (fw): Select all Collapse
UPDATE `maescont` m
LEFT OUTER JOIN
(
SELECT `nroasi`, SUM( debe ) AS t01, SUM( haber ) AS t02
FROM `detacont`
GROUP BY `nroasi`
) t
ON m.nroasi = t.nroasi
SET m.totdeb = IFNULL( t.t01, 0 ),
    m.tothab = IFNULL( t.t02, 0 )


and

Code (fw): Select all Collapse
UPDATE `cuentas` m
LEFT OUTER JOIN
(
SELECT `codcta`, SUM( debe ) AS t01, SUM( haber ) AS t02
FROM `detacont`
GROUP BY `codcta`
) t
ON m.codcta = t.codcta
SET m.debe = IFNULL( t.t01, 0 ),
    m.haber = IFNULL( t.t02, 0 )

This works faster with least network traffic.
We hope the new utility functions/method will be useful to our users.
Regards



G. N. Rao.

Hyderabad, India
Posts: 133
Joined: Mon May 12, 2008 04:13 PM
Re: Nuevo FWH 16.06
Posted: Thu Sep 01, 2016 09:47 PM

G. N. Rao.

Gracias con el tema de las DLL, libmysql.dll la uso para 32 bits y libmariadb.dll para 64bits (libmariadb64.dll camn驴bi茅 de nombre) Solucionado con la recomendaci贸n de G. N. Rao

Lo del consumo de memoria si es muy importante, el ejemplo que envi茅 es solo un simple ejemplo pero no es lo que uso, sino que se me ocurri贸 para poder mostrar un ejemplo facil.

Y el consumo de memoria es en 32bits y 64 bits.

Fivewin 16.11
Harbour 3.2.0
Visual Studio 2015 community
MariaDb/MySql

Ing. MSc. Luis Duque
http://www.accasoft.net
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Nuevo FWH 16.06
Posted: Fri Sep 02, 2016 09:50 AM

Luis,

Necesitamos un ejemplo peque帽o y auto contenido que reproduzca el consumo de memoria que comentas, gracias

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 133
Joined: Mon May 12, 2008 04:13 PM
Re: Nuevo FWH 16.06
Posted: Fri Sep 02, 2016 02:59 PM

Maestro Antonio en el caso de la nueva clase TMySql el consumo se produce inmediato

Entro al sistema ejecuto tal cual como envi茅 el ejemplo al principio y empieza el aumento, simplemente cada vez que se abre un query empieza el aumento de memoria

Fivewin 16.11
Harbour 3.2.0
Visual Studio 2015 community
MariaDb/MySql

Ing. MSc. Luis Duque
http://www.accasoft.net

Continue the discussion