Jose:
Con ::close() se me queda abierto.
Lo llamo con:
METHOD oButton25click( oSender ) CLASS TForm00
CARGAPEA():NEW( application ):show()
Application:Run()
RETURN Nil
Y el form es asi:
/*
* Proyecto: AGESME
* Fichero: CARGAPEA.prg
* Descripción:Carga Automática de Pernoctaciones de Base Datos General(PERNOBA)
* A Base de Datos Parcial(PERNOLOC)
* Autor: Paco
* Fecha: 20/04/2006
*/
#include "Xailer.ch"
CLASS CARGAPEA FROM TForm
COMPONENT oCdxDataSource1
COMPONENT oDbfDataSet1
COMPONENT oCdxDataSource2
COMPONENT oDbfDataSet2
COMPONENT oMessageBox1
METHOD CreateForm()
METHOD CARGA( oSender )
ENDCLASS
#include "CARGAPEA.xfm"
//---------------------------------------------------------- --------------------
METHOD CARGA( oSender ) CLASS CARGAPEA
local dia1, dia2
if APPDATA:NivelOp < "90"
msginfo("SU NIVEL DE AUTORIZACIÓN NO PERMITE ESTA OPERACIÓN")
RETURN NIL
ENDIF
if MsgYesNo( "¿Está seguro de querer Realizar la Carga Automática de Datos
de Pernoctaciones?" )
::oDbfDataSet1:OrdSetFocus( 2 )
set century on
dia1 := substr(dtoc(date()+6),7,4)+substr(dtoc(date()+6),3,4)+substr (dtoc(date()+6),1,2)
dia2 := substr(dtoc(date()+7),7,4)+substr(dtoc(date()+7),3,4)+substr (dtoc(date()+7),1,2)
set century off
MSGINFO("CARGO LAS PERNOCTACIONES DESDE EL: "+DIA1+" HASTA EL: "+DIA2)
::oDBFdataSet1:Seek( dia1)
do while ::oDbfDataSet1:FTOMA < dia2
if ::oDbfDataSet1:SITUA == " "
::oDbfDataSet2:AddNew()
::oDbfDataSet2:CIUDAD := ::oDbfDataSet1:CIUDAD
::oDbfDataSet2:Update()
::oDbfDataSet1:EDIT()
::oDbfDataSet1:SITUA := "1"
::oDbfDataSet1:Update()
endif
::oDbfDataSet1:skip()
enddo
endif
::close()
RETURN Nil
//---------------------------------------------------------- --------------------
"Jose F. Gimenez" <
jfgimenez@wanadoo.es> wrote:
>Paco,
>
>> Con objeto de realizar un proceso automático en unas Bases de Datos he
>> creado
>> un Formulario. LLamo al formulario, realiza el proceso automático, pero
se
>> me queda abierto el formulario.
>>
>> ¿Como puedo hacer que se cierre solito al terminar el proceso?.
>
>Llama a ::Close() al terminar
>
>--
>Un saludo,
>
>José F. Giménez
>
>