Problema con Grid al usar una tabla
Posted: Fri Nov 04, 2011 7:43 pm
Tengo la siguiente grilla:
Por alguna razón cuando cierro el formulario me aparece el siguiente error:
Error DBCMD/2001 Workarea not in use DbGoto
En los ejemplos que hay acerca de uso de grilla con tablas, no veo que ninguno cierre las tablas al cerrar el formulario. Si en este ejemplo dejo la tabla abierta no me genera el error, pero me parece que lo correcto es que cuando uno cierra un formulario se cierren las tablas que fueron abiertas.
I have the following grid:
For some reason when I close the form I get the following error:
Error DBCMD/2001 Workarea not in use DbGoto
In the examples what about grid use with tables, I do not see any end tables to close the form. If in this example I open the table does not generate the error, but I think it is right that when you close a form to close the tables were open.
Code: Select all
#include "hmg.ch"
function IInsp( q,frm,txt )
DEFINE WINDOW FrmInspsuel ;
AT 0,0 ;
WIDTH 700 ;
HEIGHT 500 ;
TITLE " Consultas " ;
MODAL ;
ON INIT {|| FrmInspSuel.Grd_TipoCont.value:={1,1} } ;
ON RELEASE {|| insp->( DbCloseArea() ) }
_use( CambiaDire() +"tipocont","insp",,.f.,CambiaDire() +"tipocont" )
titulo := "Tipo de contratación"
DEFINE GRID Grd_TipoCont
ROW 10
COL 10
WIDTH 680
HEIGHT 430
HEADERS { "Código","Nombre" }
WIDTHS { 90,140}
ROWSOURCE "Insp"
COLUMNFIELDS { 'codigo','nombre' }
CELLNAVIGATION .F.
END GRID
END WINDOW
CENTER WINDOW FrmInspSuel
ACTIVATE WINDOW FrmInspSuel
return NilError DBCMD/2001 Workarea not in use DbGoto
En los ejemplos que hay acerca de uso de grilla con tablas, no veo que ninguno cierre las tablas al cerrar el formulario. Si en este ejemplo dejo la tabla abierta no me genera el error, pero me parece que lo correcto es que cuando uno cierra un formulario se cierren las tablas que fueron abiertas.
I have the following grid:
Code: Select all
#include "hmg.ch"
function IInsp( q,frm,txt )
DEFINE WINDOW FrmInspsuel ;
AT 0,0 ;
WIDTH 700 ;
HEIGHT 500 ;
TITLE " Consultas " ;
MODAL ;
ON INIT {|| FrmInspSuel.Grd_TipoCont.value:={1,1} } ;
ON RELEASE {|| insp->( DbCloseArea() ) }
_use( CambiaDire() +"tipocont","insp",,.f.,CambiaDire() +"tipocont" )
titulo := "Tipo de contratación"
DEFINE GRID Grd_TipoCont
ROW 10
COL 10
WIDTH 680
HEIGHT 430
HEADERS { "Código","Nombre" }
WIDTHS { 90,140}
ROWSOURCE "Insp"
COLUMNFIELDS { 'codigo','nombre' }
CELLNAVIGATION .F.
END GRID
END WINDOW
CENTER WINDOW FrmInspSuel
ACTIVATE WINDOW FrmInspSuel
return NilError DBCMD/2001 Workarea not in use DbGoto
In the examples what about grid use with tables, I do not see any end tables to close the form. If in this example I open the table does not generate the error, but I think it is right that when you close a form to close the tables were open.