- Permitir la exportación de datos de DBFs cuando se usa DBF_Conversion_Support:1 y CFG individual opcional
This commit is contained in:
@@ -3,7 +3,7 @@ Lparameters toUpdateInfo
|
|||||||
Local lcNote
|
Local lcNote
|
||||||
With toUpdateInfo
|
With toUpdateInfo
|
||||||
.VersionNumber = 'v1.19.44'
|
.VersionNumber = 'v1.19.44'
|
||||||
.VersionDate = Date(2015,05,16)
|
.VersionDate = Date(2015,05,18)
|
||||||
.SourceFileUrl = 'http://vfpxrepository.com/dl/thorupdate/Projects/FoxBin2Prg/FoxBin2Prg.Zip'
|
.SourceFileUrl = 'http://vfpxrepository.com/dl/thorupdate/Projects/FoxBin2Prg/FoxBin2Prg.Zip'
|
||||||
|
|
||||||
.Link = 'http://vfpx.codeplex.com/wikipage?title=FoxBin2PRG'
|
.Link = 'http://vfpx.codeplex.com/wikipage?title=FoxBin2PRG'
|
||||||
@@ -17,8 +17,9 @@ Demo video using FoxBin2Prg with PlasticSCM: http://youtu.be/sE4wQ50Itqg
|
|||||||
|
|
||||||
Change History -------------------------------------------------------------
|
Change History -------------------------------------------------------------
|
||||||
|
|
||||||
2015/05/16 v1.19.44
|
2015/05/18 v1.19.44
|
||||||
- Bug Fix: In certain PCs FoxBin2Prg does not return error codes when called from an external program, so another terminating method is implemented (Ralf Wagner)
|
- Bug Fix: In certain PCs FoxBin2Prg does not return error codes when called from an external program, so another terminating method is implemented (Ralf Wagner)
|
||||||
|
- Allow exporting DBF data when using DBF_Conversion_Support:1 and optional individual CFG files
|
||||||
|
|
||||||
|
|
||||||
2015/05/10 v1.19.43
|
2015/05/10 v1.19.43
|
||||||
|
|||||||
@@ -164,7 +164,8 @@
|
|||||||
* 28/04/2015 FDBOZZO v1.19.43 Bug Fix: FoxBin2Prg no retorna c<>digos de error cuando se llama como programa externo (Ralf Wagner)
|
* 28/04/2015 FDBOZZO v1.19.43 Bug Fix: FoxBin2Prg no retorna c<>digos de error cuando se llama como programa externo (Ralf Wagner)
|
||||||
* 29/04/2015 FDBOZZO v1.19.43 Bug Fix: FoxBin2Prg a veces genera errores OLE cuando se ejecuta m<>s de una vez en modo objeto sobre un archivo con errores (Fidel Charny)
|
* 29/04/2015 FDBOZZO v1.19.43 Bug Fix: FoxBin2Prg a veces genera errores OLE cuando se ejecuta m<>s de una vez en modo objeto sobre un archivo con errores (Fidel Charny)
|
||||||
* 10/05/2015 FDBOZZO v1.19.43 Bug Fix: Cuando un form tiene AutoCenter=.T., hay veces en que al regenerar el binario y ejecutarlo no se muestra centrado (Esteban H)
|
* 10/05/2015 FDBOZZO v1.19.43 Bug Fix: Cuando un form tiene AutoCenter=.T., hay veces en que al regenerar el binario y ejecutarlo no se muestra centrado (Esteban H)
|
||||||
* 14/05/2015 FDBOZZO v1.19.43 Bug Fix: En ciertos PCs FoxBin2Prg no retorna c<>digos de error cuando se llama como programa externo (Ralf Wagner)
|
* 14/05/2015 FDBOZZO v1.19.44 Bug Fix: En ciertos PCs FoxBin2Prg no retorna c<>digos de error cuando se llama como programa externo (Ralf Wagner)
|
||||||
|
* 18/05/2015 FDBOZZO v1.19.44 Mejora: Permitir la exportaci<63>n de datos de DBFs cuando se usa DBF_Conversion_Support:1 y CFG individual opcional
|
||||||
* </HISTORIAL DE CAMBIOS Y NOTAS IMPORTANTES>
|
* </HISTORIAL DE CAMBIOS Y NOTAS IMPORTANTES>
|
||||||
*
|
*
|
||||||
*---------------------------------------------------------------------------------------------------
|
*---------------------------------------------------------------------------------------------------
|
||||||
@@ -15698,7 +15699,6 @@ DEFINE CLASS c_conversor_dbf_a_prg AS c_conversor_bin_a_prg
|
|||||||
*-- Header
|
*-- Header
|
||||||
loTable = CREATEOBJECT('CL_DBF_TABLE')
|
loTable = CREATEOBJECT('CL_DBF_TABLE')
|
||||||
|
|
||||||
IF toFoxBin2Prg.DBF_Conversion_Support = 4
|
|
||||||
*-- Exportaci<63>n de estructura y datos (para Diff solamente)
|
*-- Exportaci<63>n de estructura y datos (para Diff solamente)
|
||||||
ERASE (.c_OutputFile + '.TMP' )
|
ERASE (.c_OutputFile + '.TMP' )
|
||||||
toFoxBin2Prg.n_FileHandle = FCREATE( .c_OutputFile + '.TMP' )
|
toFoxBin2Prg.n_FileHandle = FCREATE( .c_OutputFile + '.TMP' )
|
||||||
@@ -15745,33 +15745,6 @@ DEFINE CLASS c_conversor_dbf_a_prg AS c_conversor_bin_a_prg
|
|||||||
ENDCASE
|
ENDCASE
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
ELSE
|
|
||||||
C_FB2PRG_CODE = C_FB2PRG_CODE + loTable.toText( ln_HexFileType, ll_FileHasCDX, ll_FileHasMemo, ll_FileIsDBC, lc_DBC_Name, .c_InputFile, lc_FileTypeDesc, @toFoxBin2Prg )
|
|
||||||
|
|
||||||
DO CASE
|
|
||||||
CASE toFoxBin2Prg.c_SimulateError = 'SIMERR_I1'
|
|
||||||
ERROR 'InputFile Error Simulation'
|
|
||||||
CASE toFoxBin2Prg.c_SimulateError = 'SIMERR_I0'
|
|
||||||
.writeErrorLog( '*** SIMULATED ERROR' )
|
|
||||||
ENDCASE
|
|
||||||
|
|
||||||
IF .l_Error
|
|
||||||
.writeLog( '*** ERRORS found - Generation Cancelled' )
|
|
||||||
EXIT
|
|
||||||
ENDIF
|
|
||||||
|
|
||||||
toFoxBin2Prg.updateProcessedFile()
|
|
||||||
|
|
||||||
|
|
||||||
*-- Genero el DB2
|
|
||||||
.updateProgressbar( 'Writing ' + toFoxBin2Prg.c_DB2 + '...', 3, 3, 1 )
|
|
||||||
IF .l_Test
|
|
||||||
toModulo = C_FB2PRG_CODE
|
|
||||||
ELSE
|
|
||||||
.write_OutputFile( (C_FB2PRG_CODE), .c_OutputFile, @toFoxBin2Prg )
|
|
||||||
ENDIF
|
|
||||||
|
|
||||||
ENDIF
|
|
||||||
|
|
||||||
*-- Hook para permitir ejecuci<63>n externa (por ejemplo, para exportar datos)
|
*-- Hook para permitir ejecuci<63>n externa (por ejemplo, para exportar datos)
|
||||||
IF NOT EMPTY(toFoxBin2Prg.run_AfterCreate_DB2)
|
IF NOT EMPTY(toFoxBin2Prg.run_AfterCreate_DB2)
|
||||||
@@ -15808,6 +15781,7 @@ DEFINE CLASS c_conversor_dbf_a_prg AS c_conversor_bin_a_prg
|
|||||||
|
|
||||||
FINALLY
|
FINALLY
|
||||||
USE IN (SELECT("TABLABIN"))
|
USE IN (SELECT("TABLABIN"))
|
||||||
|
FCLOSE( toFoxBin2Prg.n_FileHandle )
|
||||||
|
|
||||||
*-- Cierro DBC
|
*-- Cierro DBC
|
||||||
FOR I = 1 TO ADATABASES(laDatabases2)
|
FOR I = 1 TO ADATABASES(laDatabases2)
|
||||||
@@ -21717,7 +21691,7 @@ DEFINE CLASS CL_DBF_TABLE AS CL_CUS_BASE
|
|||||||
|
|
||||||
TRY
|
TRY
|
||||||
LOCAL lcText, lcTableCFG, lcIndexKey, lcIndexFile, laConfig(1), lcValue, lcConfigItem ;
|
LOCAL lcText, lcTableCFG, lcIndexKey, lcIndexFile, laConfig(1), lcValue, lcConfigItem ;
|
||||||
, lc_DBF_Conversion_Order, lc_DBF_Conversion_Condition ;
|
, lc_DBF_Conversion_Order, lc_DBF_Conversion_Condition, llExportData, laDirFile(1,5), lnFileCount ;
|
||||||
, loEx AS EXCEPTION ;
|
, loEx AS EXCEPTION ;
|
||||||
, loRecords AS CL_DBF_RECORDS OF 'FOXBIN2PRG.PRG' ;
|
, loRecords AS CL_DBF_RECORDS OF 'FOXBIN2PRG.PRG' ;
|
||||||
, loFields AS CL_DBF_FIELDS OF 'FOXBIN2PRG.PRG' ;
|
, loFields AS CL_DBF_FIELDS OF 'FOXBIN2PRG.PRG' ;
|
||||||
@@ -21726,6 +21700,7 @@ DEFINE CLASS CL_DBF_TABLE AS CL_CUS_BASE
|
|||||||
LOCAL laFields[1], lnFieldCount
|
LOCAL laFields[1], lnFieldCount
|
||||||
|
|
||||||
STORE NULL TO loIndexes, loFields, loRecords
|
STORE NULL TO loIndexes, loFields, loRecords
|
||||||
|
STORE 0 TO lnFileCount
|
||||||
lcText = ''
|
lcText = ''
|
||||||
|
|
||||||
TEXT TO lcText ADDITIVE TEXTMERGE NOSHOW FLAGS 1+2 PRETEXT 1+2
|
TEXT TO lcText ADDITIVE TEXTMERGE NOSHOW FLAGS 1+2 PRETEXT 1+2
|
||||||
@@ -21749,11 +21724,17 @@ DEFINE CLASS CL_DBF_TABLE AS CL_CUS_BASE
|
|||||||
loIndexes = THIS._Indexes
|
loIndexes = THIS._Indexes
|
||||||
lcText = lcText + loIndexes.toText( '', '', tc_InputFile )
|
lcText = lcText + loIndexes.toText( '', '', tc_InputFile )
|
||||||
|
|
||||||
IF toFoxBin2Prg.DBF_Conversion_Support = 4 && BIN2PRG (DATA EXPORT FOR DIFF)
|
|
||||||
*-- If table CFG exists, use it for DBF-specific configuration. FDBOZZO. 2014/06/15
|
*-- If table CFG exists, use it for DBF-specific configuration. FDBOZZO. 2014/06/15
|
||||||
lcTableCFG = tc_InputFile + '.CFG'
|
lcTableCFG = tc_InputFile + '.CFG'
|
||||||
|
lnFileCount = ADIR(laDirFile, lcTableCFG)
|
||||||
|
|
||||||
IF FILE(lcTableCFG)
|
IF toFoxBin2Prg.DBF_Conversion_Support = 4 ; && BIN2PRG (DATA EXPORT FOR DIFF)
|
||||||
|
OR toFoxBin2Prg.DBF_Conversion_Support = 1 AND lnFileCount = 1 THEN
|
||||||
|
llExportData = .T.
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF llExportData THEN
|
||||||
|
IF lnFileCount = 1
|
||||||
toFoxBin2Prg.writeLog()
|
toFoxBin2Prg.writeLog()
|
||||||
toFoxBin2Prg.writeLog('* Found configuration file: ' + lcTableCFG)
|
toFoxBin2Prg.writeLog('* Found configuration file: ' + lcTableCFG)
|
||||||
|
|
||||||
@@ -21786,7 +21767,6 @@ DEFINE CLASS CL_DBF_TABLE AS CL_CUS_BASE
|
|||||||
|
|
||||||
*** DH 06/02/2014: added _Records
|
*** DH 06/02/2014: added _Records
|
||||||
loRecords = THIS._Records
|
loRecords = THIS._Records
|
||||||
*lcText = lcText + loRecords.toText(@laFields, lnFieldCount, lc_DBF_Conversion_Condition)
|
|
||||||
FWRITE( toFoxBin2Prg.n_FileHandle, lcText )
|
FWRITE( toFoxBin2Prg.n_FileHandle, lcText )
|
||||||
loRecords.toText(@laFields, lnFieldCount, lc_DBF_Conversion_Condition, @toFoxBin2Prg)
|
loRecords.toText(@laFields, lnFieldCount, lc_DBF_Conversion_Condition, @toFoxBin2Prg)
|
||||||
lcText = ''
|
lcText = ''
|
||||||
@@ -21797,10 +21777,8 @@ DEFINE CLASS CL_DBF_TABLE AS CL_CUS_BASE
|
|||||||
<<>>
|
<<>>
|
||||||
ENDTEXT
|
ENDTEXT
|
||||||
|
|
||||||
IF toFoxBin2Prg.DBF_Conversion_Support = 4 && BIN2PRG (DATA EXPORT FOR DIFF)
|
|
||||||
FWRITE( toFoxBin2Prg.n_FileHandle, lcText )
|
FWRITE( toFoxBin2Prg.n_FileHandle, lcText )
|
||||||
lcText = ''
|
lcText = ''
|
||||||
ENDIF
|
|
||||||
|
|
||||||
|
|
||||||
CATCH TO loEx
|
CATCH TO loEx
|
||||||
|
|||||||
Reference in New Issue
Block a user