La consulta:
- Code: Select all Expand view RUN
//CONSULTA DEL RESUMEN DE LAS FACTURAS POR CAJA Y FECHA
cQry:="SELECT FAC.ll_cajare,ll_fechas,"+;
"IFNULL(SUM(MOV.mm_subtot),0) AS subtotal,"+;
"IFNULL(SUM(MOV.mm_basiva),0) AS base,"+;
"IFNULL(SUM(MOV.mm_valiva),0) AS iva,"+;
"IFNULL(SUM(MOV.mm_totale),0) AS total "+;
"FROM ("+oLamcla:tFact+" FAC) "+;
"LEFT JOIN "+oLamcla:tMofa+" MOV ON FAC.ll_docume=MOV.mm_docume AND FAC.ll_consec=MOV.mm_consec "+;
"WHERE FAC.ll_cajare='"+alltrim(cCjaActiva)+"' AND FAC.ll_fechas='"+dtos(dFechaDia)+"' AND FAC.ll_anulad<>'A'"
oRs := FW_OPENRECORDSET(oCnCja,cQry,adLockOptimistic,adOpenKeyset)
NrEG := oRs:RecordCount()
El error:
- Code: Select all Expand view RUN
Application
===========
Path and name: C:\DLYMA\dlyma.exe (32 bits)
Size: 6,552,576 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20190613)
FiveWin version: FWH 19.09
C compiler version: Borland/Embarcadero C++ 7.3 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 29 secs
Error occurred at: 25/01/2021, 10:14:45
Error description: Error ADODB.RecordSet/6 DISP_E_UNKNOWNNAME: RECORDCOUNT
Args:
Stack Calls
===========
Called from: => TOLEAUTO:RECORDCOUNT( 0 )
Called from: z:\prg\R32_caja.prg => PCIERRE( 1614 )
Called from: z:\prg\R32_caja.prg => (b)FOPCIONCAJA( 908 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 704 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 990 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1791 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2030 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1097 )
Called from: z:\prg\R32_menu.prg => VTNAPRINCIPAL( 550 )
Called from: z:\prg\R32_menu.prg => MAIN( 90 )
Si cambio la consulta sin la relación LEFT JOIN si me devuelve correctamente el valor 0
- Code: Select all Expand view RUN
cQry:="SELECT * FROM tbl_fact WHERE ll_consec='777777777'"
De antemano gracias