al hacer un oSql:Requery() con fwh nativa en la ultima version 21.02 me da error, compilando con 21.01 funciona correctamente, el codigo es este :
- Code: Select all Expand view
::oSqlBodyVta:ReQuery({::aSeek["desde"],::oSql:codart})
y el query es :
- Code: Select all Expand view
cQuery:= "SELECT a.fecha, a.codart, b.coddis, b.codpro, CONCAT(Trim(IFNULL(b.nombre,'')),' ',Trim(IFNULL(c.nombre,''))) AS cArticulo, "+;
" a.codcli AS codcli, IFNULL(d.nombre,'') AS cCliente, a.cantid AS venta, IFNULL(a.terceros,0) AS vacios, a.precio, "+;
" a.importe, "+;
MYCOMPROBANTE( "e", .t. )+" AS comprobante, "+; // "CONCAT(LEFT(e.clave,3),' 00',SUBSTRING(e.clave,4,2),'-',SUBSTRING(e.clave,6,8)) AS comprobante, "+;
" 0 AS codpro, '' AS cProveedor, 0 AS compra "+;
" FROM cvtal a "+;
" LEFT JOIN mart b ON a.codart = b.codart "+;
" LEFT JOIN mpro c ON b.codpro = c.codpro "+;
" LEFT JOIN mcli d ON a.codcli = d.codcli "+;
" LEFT JOIN cregv e ON a.clave=e.clave AND a.fecha=e.fecha AND a.codcli=e.codcli "+;
" WHERE a.fecha = ? and a.codart = ? and ifnull(b.nostk,0)=0 "+;
"ORDER BY cCliente, comprobante" // "cArticulo"
::cQueryBodyVta:= cQuery
::oSqlBodyVta := ::oServer:Rowset( cQuery, { ::aSeek["desde"], ::oSql:codart} )
::oSqlBodyVta:Gotop()
el error es :
Time from start: 0 hours 0 mins 9 secs
Error occurred at: 30/03/2021, 18:51:24
Error description: Error BASE/1132 Error de rango: acceso al array
Args:
[ 1] = A {SToD("20210308"),"00020108 ",2,108,"AJO/S SOLAR DEL GENERAL S.A.",109,"VISCUSSO FA ... }
[ 2] = N 16
Stack Calls
===========
Called from: .\source\internal\FWMARIA.PRG => (b)FWMARIAROWSET(1287)
Called from: .\source\internal\FWMARIA.PRG => FWMARIAROWSET:LAPPENDBLANK(0)
Called from: .\source\internal\FWMARIA.PRG => FWMARIAROWSET:CANCELAPPEND(4764)
Called from: .\source\internal\FWMARIA.PRG => FWMARIAROWSET:REQUERY(3378)
Called from: c:\sistema\proyectos\titanium\source\Planillastk.prg => (b)TPLANILLASTOCK_NEW(110)
Saludos.