FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index WhatsNew / Novedades New FTDN June 2020 (FWH 20.06)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
New FTDN June 2020 (FWH 20.06)
Posted: Thu Jul 09, 2020 09:37 AM

May and June 2020

  • XBrowse:
    New DATA bPastBof
    See new example BALANCE.PRG to check advanced use of bPastBof and bPastEof

  • XBrowse:

  • In some rare cases, oEditGet in the function EditGetKeyDown is becoming nil and
    resulting in runtime error. fixed

viewtopic.php?f=3t=38925

  • new function HashTree( hHash, [nOpenLevel] ) --> oTree
    A nested hash (some values of a hash being hash again) can be represented
    as a tree for convenient display in xbrowse.

viewtopic.php?f=3t=39022p=232806hilit=hash_tree#p232806

  • New data of TXBrwColumn: bDataStrAlign.
    If assigned, the codeblock is evaluated with oCol as parameter and the result
    overrides nDataStrAlign

  • SqlRdd: Enhanced compatibility for Vertical Scrollbars.

  • Fix: uCharToVal( cDate, "D" ) is not always returning the correct result.
    static function dCharToDate( cDate ) is revised to fix the issue.

viewtopic.php?f=3t=38907

  • TDatarow class: Now can append new row to xbrowse of empty array if the data
    cDataType, nDataLen and nDataDec are specified for the browse columns.

  • Fix: TDtPicke.prg: Month is shown as 00 when picture clause is specified as "D" or "E".
    Fixed.

viewtopic.php?f=3p=233094#p233094

  • FWMariaRowset: Method Rowset() is not accepting sql statements like CHECK TABLE,
    ANALYZE TABLE, etc. Fixed.

viewtopic.php?f=3t=39104

  • FW_DemoDB(): Important Change:
    This function provides connection to a MySql server in the cloud for free usage
    of fwh users for demo purposes.
    Now the cloud server is moved to another MariaDB server with the latest version
    to provide better user experience. For this reason, this function in earlier
    versions fail to connect to any server.

  • New functions for MSSQL in adofuncs.prg
    FW_MSSQL_Backup( oCn, cDb, cFile ) --> lSuccess
    FW_MSSQL_Restore( oCn, cDb, cFile ) --> lSuccess
    Note: Limited to file on local disk only.

  • Enhanced: function StackVars( [lView] ) --> aStackFuncVarsInfo
    in fwh\source\function\callstac.prg

  • See fwh\samples\teststack.prg

  • New functions in adofuncs.prg to access Excel files on computers not having
    MSOffice installed.

1) FW_OpenAdoExcelBook( cFileXLS, [lHeaders := .t.] ) --> AdoConnection Object
- It is possible to open xls files on all computers using the default Jet Ado provider.
To open xlsx, xlsm, xlsb files, Microsoft ACE.OLEDB.12.0 provider must have been
installed on the computer. This can be installed by installing Microsoft Access
Runtime (free).
MSOffice is not required.
64-bit executable requires installation of ACE.OLEDB.12.0 64-bits version.

 - 2nd parameter lHeaders is optional and defaults to .t.  This indicates whether to
 treat the first row as headers of the table.
 - If successful, returns Ado connection object. Returns nil on failure.
 FW_AdoTables( oCn ) lists all sheets and named tables in the workbook.

2) FW_OpenAdoExcelSheet( cFileXLS/oCn, [cSheet/nSheetNo], [cRange], [lHeaders] )
--> AdoRecordSet object with all data in the sheet/table.
1. cFileXLS/oCn: Can be excel file name or connection object obtained using
the previous function.
2. Sheet: (Optional: defaults to the first sheet) If provided it can be the
serial number of a sheet or name of a sheet or named table. Invalid values result
in failure of the function.
- This can also be an Sql statement like "select name,city from [sheet1$]"
3. cRange: (Optional: defaults to the used range)
4. lHeaders: (Optional: defaults to .t.)
Returns: Ado Recordset object containing the data contained in the sheet/range
or table. This data can be viewed and manipulated like any other recordset.

Example:
oRs := FW_OpenAdoExcelSheet( "test.xls" )
XBROWSER oRs FASTEDIT
oRs:Close()
oRs:ActiveConnection:Close()
Notes: The book is opened in exclusive mode. It is necessary to close the connection
object soon after use.

  • FWMariaConnection: The methods CreateTable( cTable, aStruct, ... ) and
    CreateTableSQL( cTable, aStruct,... ) are modifying the array aStruct. Though,
    the methods execute correctly, using the modified aStruct array for some other
    purpose may create problems. This is fixed now.

  • FWMariaRowSet: While virtual generated (calculated) columns are recognised as
    readonly, stored generated columns are not. Fixed now.

  • New: Font.prg: New CLASSDATA nDefaultCharSet.
    If assigned, this value will be used for nCharset by default for all fonts.

viewtopic.php?f=3t=14142

  • New clause CARGO <ucargo> in SAY and BTNBMP commands. Value of cargo can be
    used in any codeblocks including bPrompt. Codeblock bSay/bPrompt is evaluated
    with Self as parameter

&&&&&&&&

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: New FTDN June 2020 (FWH 20.06)
Posted: Sat Jul 11, 2020 05:26 PM

Mayo and Junio 2020

  • XBrowse:
  • Nuevos DATAs bPastBof y bPastEof
    Mira el nuevo ejemplo Balance.prg para comprobar el uso avanzado de bPastBof y bPastEof,

  • XBrowse:

  • En alg煤n raro caso, oEditGet en la funci贸n EditGetKeyDown toma el valor nulo y provoca
    un error en tiempo de ejecuci贸n. Solucionado.
    viewtopic.php?f=3&t=38925

  • Nueva funci贸n HashTree( hHash, [nOpenLevel] ) --> oTree
    Se puede representar un hash anidado (valores de un hash a su vez pueden ser un hash), como
    un 谩rbol para una visualizaci贸n apropiada en un Xbrowse.
    viewtopic.php?f=3&t=39022&p=232806&hilit=hash_tree#p232806

  • Nueva DATA en TXBrwColumn: bDataStrAlign.
    Si se asigna, el bloque de c贸digo se eval煤a con oCol como par谩metro y el resultado anula
    nDataStrAlign.

  • SqlRdd: Compatibilidad mejorada para barras de desplazamiento vertical.

  • Correcci贸n: uCharToVal( cDate, "D" ) no siempre devuelve el resultado correcto.
    La funci贸n est谩tica dCharToDate ( cDate ) se revisa para solucionar el problema.
    viewtopic.php?f=3&t=38907

  • Clase TDatarow: Ahora puede agregar una nueva fila a xbrowse de una matriz vac铆a si los datos
    cDataType, nDataLen y nDataDec se especifican para las columnas de exploraci贸n.

  • Correcci贸n: TDtPicke.prg: El mes se muestra como 00 cuando la cl谩usula de imagen se especifica
    como "D" o "E". Solucionado.
    viewtopic.php?f=3&p=233094#p233094

  • FWMariaRowset: El m茅todo Rowset() no acepta sentencias sql como CHECK TABLE, ANALYZE TABLE, etc.
    Solucionado.
    viewtopic.php?f=3&t=39104

  • FW_DemoDB(): Cambio importante:
    Esta funci贸n proporciona conexi贸n a un servidor MySql en la nube para uso gratuito de los usuarios
    de fwh con fines de demostraci贸n.
    Ahora el servidor en la nube se ha movido a otro servidor MariaDB con la 煤ltima versi贸n para proporcionar
    una mejor experiencia de usuario. Por esta raz贸n, esta funci贸n en versiones anteriores no pod铆a
    conectarse a ning煤n servidor.

  • Nuevas funciones para Microsoft SQL Server en adofuncs.prg.
    FW_MSSQL_Backup( oCn, cDb, cFile ) --> lSuccess
    FW_MSSQL_Restore( oCn, cDb, cFile ) --> lSuccess
    Nota: Limitado s贸lo al achivo del disco local.

  • Mejora: Funci贸n StackVars( [lView] ) --> aStackFuncVarsInfo en fwh\source\function\callstac.prg.

  • Mira el ejemplo: fwh\samples\teststack.prg

  • Nuevas funciones en adofuncs.prg para acceder a ficheros Excel en equipos sin Microsoft Office instalado.

1)FW_OpenAdoExcelBook( cFileXLS, [lHeaders := .t.] ) --> objeto AdoConnection
- Es posible abrir archivos xls en todos los equipos usando el proveedor predeterminado de Jet Ado.
Para abrir archivos xlsx, xlsm, xlsb, el proveedor Microsoft ACE.OLEDB.12.0 debe estar instalado en el
equipo. Esto se puede hacer instalando Microsoft Access Runtime (gratis).
No se requiere MSOffice.
El ejecutable de 64 bits requiere la instalaci贸n de la versi贸n ACE.OLEDB.12.0 de 64 bits.
- El segundo par谩metro lHeaders es opcional y su valor predeterminado es TRUE. Esto indica si
trata la primera fila como encabezado de la tabla.
- Si tiene 茅xito, devuelve el objeto de conexi贸n Ado. Devuelve nulo en caso de fallo.
FW_AdoTables (oCn) enumera todas las hojas y tablas con nombre en el libro.

2) FW_OpenAdoExcelSheet( cFileXLS/oCn, [cSheet/nSheetNo], [cRange], [lHeaders] ) --> objeto AdoRecordSet con todos los datos en la hoja/tabla.
1.- cFileXLS/oCn: puede ser un nombre de archivo de Excel o un objeto de conexi贸n obtenido mediante la funci贸n anterior.
2.- Sheet: (Opcional: el valor predeterminado es la primera hoja) Si se proporciona, puede ser el n煤mero de serie de una
hoja o nombre de una hoja o tabla con nombre. Los valores no v谩lidos provocan el fallo de la funci贸n.
- Esto tambi茅n puede ser una declaraci贸n SQL como "select name,city from [sheet1$]".
3.- cRange: (Opcional: el valor predeterminado es el rango utilizado).
4.- lHeaders: (Opcional: el valor predeterminado es TRUE).
Devuelve: Un objeto Ado Recordset que contiene los datos contenidos en la hoja/rango o tabla.
Estos datos se pueden ver y manipular como cualquier otro conjunto de registros.

Ejemplo:
oRs := FW_OpenAdoExcelSheet( "test.xls" )
XBROWSER oRs FASTEDIT
oRs:Close()
oRs:ActiveConnection:Close()

Nota: El libro se abre en modo exclusivo. Es necesario cerrar el objeto de conexi贸n poco despu茅s de su uso.

  • FWMariaConnection: Los m茅todos CreateTable( cTable, aStruct, ... ) y CreateTableSQL( cTable, aStruct, ... )
    est谩n modificando la matriz aStruct. Sin embargo, los m茅todos se ejecutan correctamente, el uso de la matriz
    aStruct modificada para alg煤n otro prop贸sito puede crear problemas. Solucionado ahora.

  • FWMariaRowSet: Mientras que las columnas virtuales generadas (calculadas) se reconocen como de solo lectura,
    las columnas generadas almacenadas no. Solucionado ahora.

  • Nuevo: Font.prg: Nueva CLASSDATA nDefaultCharSet.
    Si se asigna, este valor se usar谩 para nCharset de manera predeterminada para todas las fuentes.
    viewtopic.php?f=3&t=14142

  • Nueva cl谩usula CARGO <ucargo> en los comandos SAY y BTNBMP. El valor cargo se puede utilizar en
    cualquier bloque de c贸digo, incluido bPrompt. El bloque de c贸digo bSay/bPrompt se eval煤a con Self como par谩metro.

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion