Debes agregarle los registros con DBU porque el 2do PRG no tiene inclusion de registros y crea la DBF vacia
Atento a tus comentarios
#include "FiveWin.ch"
MEMVAR oWndPrinc
FUNCTION MAIN()
LOCAL oBar, oBtn
SetHandleCount(100)
REQUEST DBFCDX
RddSetDefault("DBFCDX")
SET DEFAULT TO \MX
SET DATE TO FRENCH
SET EPOCH TO 2000
SET CENTURY ON
SET DELETED OFF
SET EXCLUSIVE OFF
SET _3DLOOK ON
DEFINE WINDOW oWndPrinc ;
TITLE "Ventana Principal " + FWVERSION MDI ;
MENU MenuPri()
DEFINE BUTTONBAR oBar OF oWndPrinc SIZE 40,41 3D
DEFINE BUTTON oBtn OF oBar;
TOOLTIP "Bancos" MESSAGE "Bancos" NOBORDER ADJUST;
ACTION BANCOS()
ACTIVATE WINDOW oWndPrinc MAXIMIZED ;
VALID MsgYesNo( "¿ Está seguro de querer Salir ?", "!!! Atención !!!" )
RETURN NIL
FUNCTION MenuPri()
LOCAL oMenu
MENU oMenu
MENUITEM "&General"
MENU
MENUITEM "&Parametros de Precio"
SEPARATOR
MENUITEM "Salir"
ENDMENU
MENUITEM "&Caja y &Bancos"
MENU
MENUITEM "&Bancos" ;
ACTION BANCOS()
ENDMENU
ENDMENU
RETURN oMenu
#include "Fivewin.ch"
#include "xbrowse.ch"
MEMVAR oWndPrinc
STATIC CODBCO, NOMBCO, CTABCO, CTACTA, GRA, NREG, oDlg, oBrw, oCol, cCODANT, oRpt
STATIC TNUEVO := .T.
STATIC LVAN := .F.
FUNCTION BANCOS()
LOCAL oWndBCO, cTitle, oFont, oBar, oMeter, oText, cAlias
LOCAL oBrw
LOCAL UBI:= "DATA\"
LOCAL cVIA := "DBFCDX"
cTitle := "Cuentas Bancarias"
CREASTRUCT()
ABRESTRUCT()
DEFINE FONT oFont NAME "Arial" SIZE 0,-12 BOLD
DEFINE WINDOW oWndBCO MDICHILD OF oWndPrinc ;
FROM 0, 0 TO 0, 0 ;
TITLE cTitle ;
COLOR 0, 14215660 ;
PIXEL ;
SET FONT OF oWndBCO TO oFont
SET MESSAGE OF oWndBCO
oWndBCO:Hide()
DEFINE BUTTONBAR oBar OF oWndBCO SIZE 40, 50 3D
DEFINE BUTTON OF oBar FLAT ;
TOOLTIP "Incluir" MESSAGE " Incluir";
DEFINE BUTTON OF oBar FLAT ;
TOOLTIP "Salir" MESSAGE " Salir" ;
ACTION oWndBCO:END()
oBrw := TXBrowse():New( oWndBCO )
oBrw:SetRDD()
oBrw:CreateFromCode()
oWndBCO:SetControl(oBrw)
ACTIVATE WINDOW oWndBCO ;
ON INIT oBrw:Refresh() ;
oWndPrinc:cascade()
oWndBCO:oClient = oBrw
oWndBCO:Show()
RETURN NIL
STATIC FUNCTION CREASTRUCT()
LOCAL BANCO
local n
BANCO := "\DATA\BANCO.DBF"
lMkDir("DATA")
IF .NOT. FILE ("DATA\BANCO.DBF")
DbCreate( "DATA\BANCO", { { "BCO_CODIGO", "C", 12, 0 },;
{ "BCO_DESCRI", "C", 30, 0 },;
{ "BCO_CUENTA", "C", 20, 0 },;
{ "BCO_SLDANT", "N", 14, 0 },;
{ "BCO_DEBE" , "N", 14, 0 },;
{ "BCO_HABER" , "N", 14, 0 },;
{ "BCO_CHEQUE", "N", 10, 0 },;
{ "BCO_NOTADB", "N", 10, 0 },;
{ "BCO_ENOTRA", "C", 1, 0 },;
{ "BCO_CODMON", "C", 3, 0 },;
{ "BCO_CTABAN", "C", 20, 0 } } )
USE DATA\BANCO ALIAS BANCO
for n = 1 to 500
banco->( DBAppend() )
banco->BCO_CODIGO = "CODIGO" + StrZero( n, 3 )
banco->BCO_DESCRI = "DESCRIBE" + StrZero( n, 3 )
next
dbCloseAll()
ENDIF
IF .NOT. FILE ("DATA\BANCO.CDX")
USE DATA\BANCO ALIAS BANCO
MsgMeter( { | oMeter, oText, oDlg, lEnd | ;
BuildIndex( oMeter, oText, oDlg, @lEnd, "BANCO->BCO_CODIGO ", "CODIGO" ) },;
"Indexando Cuentas por Codigo...", "Espere un momento" )
dbCloseAll()
ENDIF
RETURN (.T.)
STATIC FUNCTION ABRESTRUCT()
LOCAL UBI:= "DATA\"
LOCAL cVIA := "DBFCDX"
IF SELECT("BANCO")>0
BANCO->(DBCLOSEAREA())
ENDIF
IF SELECT("BANCO")=0
DBUSEAREA(.T.,cVia,UBI+"BANCO","BANCO",.T.)
ENDIF
BANCO->(ORDSETFOCUS(1))
RETURN (.T.)
STATIC FUNCTION BuildIndex( oMeter, oText, oDlg, lEnd, campo, bolsa )
oMeter:nTotal = RecCount()
OrdSetFocus(0)
INDEX ON &(Campo) TAG &(Bolsa) ;
EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd )
RETURN NIL
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for Harbour 7.12 - Dec. 2007 Harbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2007 for Microsoft Windows 95/98/NT/2000/ME/XP/Vista ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST
if NOT EXIST %2.prg GOTO :NOEXIST
ECHO Compiling...
set hdir=%HBDIR%
set hdirl=%hdir%\lib\win\bcc
set fwh=c:\fwh
set bcdir=c:\BCC55
%hdir%\bin\harbour %1 /n /i%fwh%\include;%hdir%\include /w /p > comp.log
%hdir%\bin\harbour %2 /n /i%fwh%\include;%hdir%\include /w /p > comp.log
IF ERRORLEVEL 1 GOTO COMPILEERRORS
@type comp.log
echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include %1.c %2.c > b32.bc
%bcdir%\bin\bcc32 -M -c @b32.bc
:ENDCOMPILE
IF EXIST %1.rc %bcdir%\bin\brc32 -r -I%bcdir%\include %1
echo %bcdir%\lib\c0w32.obj + > b32.bc
echo %1.obj %2.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
echo %fwh%\lib\FiveH.lib %fwh%\lib\FiveHC.lib + >> b32.bc
echo %hdir%\lib\rtl.lib + >> b32.bc
echo %hdir%\lib\vm.lib + >> b32.bc
echo %hdir%\lib\gtgui.lib + >> b32.bc
echo %hdir%\lib\lang.lib + >> b32.bc
echo %hdir%\lib\macro.lib + >> b32.bc
echo %hdir%\lib\rdd.lib + >> b32.bc
echo %hdir%\lib\dbfntx.lib + >> b32.bc
echo %hdir%\lib\dbfcdx.lib + >> b32.bc
echo %hdir%\lib\dbffpt.lib + >> b32.bc
echo %hdir%\lib\hbsix.lib + >> b32.bc
echo %hdir%\lib\debug.lib + >> b32.bc
echo %hdir%\lib\common.lib + >> b32.bc
echo %hdir%\lib\pp.lib + >> b32.bc
echo %hdir%\lib\codepage.lib + >> b32.bc
echo %hdir%\lib\hbwin32.lib + >> b32.bc
rem Uncomment these two lines to use Advantage RDD
rem echo %hdir%\lib\rddads.lib + >> b32.bc
rem echo %hdir%\lib\Ace32.lib + >> b32.bc
echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %bcdir%\lib\import32.lib + >> b32.bc
echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc
echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\rasapi32.lib, >> b32.bc
IF EXIST %1.res echo %1.res >> b32.bc
if %GT% == gtwin %bcdir%\bin\ilink32 -Tpe -s @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
if %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
%1
GOTO EXIT
ECHO
rem delete temporary files
@del %1.c
:COMPILEERRORS
@type comp.log
ECHO * Compile errors *
GOTO EXIT
:LINKERROR
ECHO * Linking errors *
GOTO EXIT
:SINTAX
ECHO SYNTAX: Build [Program] {-- No especifiques la extensi¢n PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT
:NOEXIST
ECHO The specified PRG %1 does not exist
:EXIT
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 37 guests