Estoy queriendo mostrar una consulta en un Xbrowse que defino en un recurso, pero me da un error. La misma consulta si la muestro con la funci贸n xbrowse funciona correctamente.
Seguramente algo b谩sico estoy haciendo mal porque estoy comenzando con esto, por eso recurro a la buena predisposici贸n del foro.
oRs := TOleAuto():New("ADODB.Recordset")
oRs:Open(cSql,oCn)
DEFINE WINDOW oWnd1 MDICHILD TITLE "RESULTADO DE LA CONSULTA" OF oWnd NOZOOM ICON oIco
聽 聽 聽 聽 聽DEFINE BUTTONBAR oBar 聽SIZE 60,60 OF oWnd1 2010
聽 聽 聽 聽 聽DEFINE BUTTON RESOURCE "EXCE" OF oBar 聽 TOOLTIP "Exportar a Excel" 聽;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ACTION oBrw:ToExcel() 聽PROMPT "Exporta" TOP
聽 聽 聽 聽 聽DEFINE BUTTON RESOURCE "IMPR" OF oBar TOOLTIP "Imprimir Planilla" 聽;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ACTION oBrw:Report("Reporte",.T.,.F.) PROMPT "Reporte" TOP
聽 聽 聽 聽 聽DEFINE BUTTON RESOURCE "SALE" OF oBar TOOLTIP "Cerrar Ventana" ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ACTION oWnd1:End() 聽PROMPT "Cerrar" TOP
聽 聽oWnd1:bGotFocus := { || oDlg:SetFocus}
聽 聽oWnd1:bResized := { || Incrusta( oWnd1, oDlg, .t.) }
聽 聽 聽DEFINE DIALOG oDlg RESOURCE "ABMS" OF oWnd1
聽 聽 聽oBrw := TXBrowse():New()
聽 聽 REDEFINE XBROWSE oBrw ID 111 OF oDlg RECORDSET oRs 聽AUTOCOLS AUTOSORT CELL
聽 聽 聽// Activo el dialogo y al iniciar muevo a 0,0
聽 聽 聽ACTIVATE DIALOG oDlg NOWAIT ON INIT oDlg:Move(0,0)
聽 聽ACTIVATE WINDOW oWnd1 ON INIT Incrusta( oWnd1, oDlg, .T.)El error que me genera al mostrar el dialogo es el siguiente
Application
===========
聽 聽Path and name: F:\ado.exe (32 bits)
聽 聽Size: 2,131,456 bytes
聽 聽Compiler version: Harbour 3.1.0dev (Rev. 17114)
聽 聽FiveWin 聽Version: FWH 11.11
聽 聽Windows version: 5.1, Build 2600 Service Pack 3
聽 聽Time from start: 0 hours 0 mins 51 secs
聽 聽Error occurred at: 22/05/2013, 11:55:42
聽 聽Error description: (DOS Error -2147352567) WINOLE/1007 聽Argument error: RECORDCOUNT
Stack Calls
===========
聽 聽Called from: 聽=> TOLEAUTO:RECORDCOUNT( 0 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE_SETADO( 4277 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 1381 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1250 )
聽 聽Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1665 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11627 )
聽 聽Called from: .\source\classes\WINDOW.PRG => _FWH( 3169 )
聽 聽Called from: 聽=> SYSREFRESH( 0 )
聽 聽Called from: .\source\classes\DIALOG.PRG => TDIALOG:END( 508 )
聽 聽Called from: .\source\function\ERRSYSW.PRG => (b)ERRORDIALOG( 407 )
聽 聽Called from: .\source\classes\BUTTON.PRG => TBUTTON:CLICK( 157 )
聽 聽Called from: .\source\classes\CONTROL.PRG => TBUTTON:HANDLEEVENT( 1653 )
聽 聽Called from: .\source\classes\WINDOW.PRG => _FWH( 3169 )
聽 聽Called from: 聽=> SENDMESSAGE( 0 )
聽 聽Called from: .\source\classes\DIALOG.PRG => TDIALOG:COMMAND( 379 )
聽 聽Called from: 聽=> TWINDOW:HANDLEEVENT( 0 )
聽 聽Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 882 )
聽 聽Called from: 聽=> DIALOGBOXINDIRECT( 0 )
聽 聽Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 270 )
聽 聽Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 426 )
聽 聽Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 31 )
聽 聽Called from: 聽=> TOLEAUTO:RECORDCOUNT( 0 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE_SETADO( 4277 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 1381 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1250 )
聽 聽Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1665 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11627 )
聽 聽Called from: .\source\classes\WINDOW.PRG => _FWH( 3169 )
聽 聽Called from: 聽=> DIALOGBOXINDIRECT( 0 )
聽 聽Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 270 )
聽 聽Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 426 )
聽 聽Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 31 )
聽 聽Called from: 聽=> TOLEAUTO:RECORDCOUNT( 0 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE_SETADO( 4277 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 1381 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1250 )
聽 聽Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1665 )
聽 聽Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11627 )
聽 聽Called from: .\source\classes\WINDOW.PRG => _FWH( 3169 )
聽 聽Called from: 聽=> WINRUN( 0 )
聽 聽Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 990 )
聽 聽Called from: ADO.prg => MAIN( 51 )Gracias de antemano por su colaboraci贸n