oDatos := oCon:Query("Select * from productos , articulos")
oQry:= oSrv:Query( "SELECT desc_div FROM divisiones ORDER BY id_div" )
// Dialogo
DEFINE DIALOG soDlg1 RESOURCE "dlg_Browse" OF oWnd TITLE "Divisiones"
soDlg1:lHelpIcon:= FALSE
REDEFINE XBROWSE oBrw OBJECT oQry ID 500 ;
AUTOCOLS AUTOSORT HEADERS "Divisiones" // El browse se muestra correctamente
...
...
local oQry
define query oQry "SELECT * FROM tbdatos.clientes"
select * from tbclientes"
DEFINE query ::oQry "select " +;
"tbfacturas.fecha as c1, " +;
"tbfacturados.descripcion as c2, " +;
"tbfacturados.cantidad as c3, " +;
"tbfacturados.precio as c4, " +;
"tbfacturados.idfactura c5 "+;
"from " +;
"tbfacturas " +;
"left join tbfacturados " +;
"on tbfacturas.id = tbfacturados.idfactura " +;
"where tbfacturas.fecha = " + ClipValue2SQL(vGets[1])+;
" order by tbfacturados.descripcion"
cDatos := "select " +;
"tbfacturas.fecha as c1, " +;
"tbfacturados.descripcion as c2, " +;
"tbfacturados.cantidad as c3, " +;
"tbfacturados.precio as c4, " +;
"tbfacturados.idfactura c5 "+;
"from " +;
"tbfacturas " +;
"left join tbfacturados " +;
"on tbfacturas.id = tbfacturados.idfactura " +;
"where tbfacturas.fecha = " + ClipValue2SQL(vGets[1])+;
" order by tbfacturados.descripcion"
eDatos := {|| query := ::Query(cDatos)}
EVAL(eDatos) // evaluas la sentencia cuando lo requieras, que al final es lo mismo que el ::refresh()
...
...
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 17 guests