Lo que pasa es que estoy tratando de usar ventanas mdi con un xbrowse, pero me esta arrojando un error que no he podido corregir, les adjunto el codigo para ver si alguien me puede dar una luz.
La ventana se dibuja bien, pero cuando hago clic sobre el xbrowse, lanza el error.
El codigo de tengo es el siguiente:
- Code: Select all Expand view
FUNCTION vHija()
LOCAL aCol:={0,0,0},nWidth:=0
Local cVar := "SELECT * FROM lyma_cobro_serv WHERE ss_manzan=100"
Private oRsCte, oRsCta, oRsCpto,oWChild
oRsCte := FW_OPENRECORDSET(oLamcla:oCon,cVar,adLockOptimistic,adOpenKeyset)
DEFINE FONT oFontCli NAME "TAHOMA" SIZE 0, -13
DEFINE WINDOW oWChild MDICHILD NOSYSMENU;
TITLE "Ordenes de Corte" OF oWnd
SET FONT OF oWChild TO oFontCli
SET MESSAGE OF oWChild TO "ordenes de corte "
DEFINE BUTTONBAR oBar1 OF oWChild SIZE 80, 60 2007
DEFINE BUTTON OF oBar1 ACTION oWChild:End() ;
RESOURCE "Salir" PROMPT "Salir" TOOLTIP "Salir de esta pantalla"
oBrw := TXBrowse():New( oWChild )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrw:nColDividerStyle := LINESTYLE_LIGHTGRAY
oBrw:nHeaderLines := 1
oBrw:lColDividerComplete := .t.
oBrw:lRecordSelector := .t.
oBrw:bClrSel := {|| { CLR_BLACK,oLamcla:cClr7 } }
oBrw:bClrStd := {|| IF( (oRsCte:AbsolutePosition()%2)==0,{pReColLet(oRsCte:Fields( "ss_contro" ):Value),oLamcla:cClr2},{pReColLet(oRsCte:Fields( "ss_contro" ):Value),oLamcla:cClr1} ) }
oBrw:bClrSelFocus := {|| { CLR_WHITE,oLamcla:cClr8 } }
oBrw:l2007 := .T.
oBrw:nStretchCol := STRETCHCOL_LAST
aCol[ 1] := oBrw:AddCol()
aCol[ 1]:bStrData := { || If( oRsCte:Eof, Space( nWidth ), cValtoChar( oRsCte:Fields( "ss_docume" ):Value ) ) }
aCol[ 1]:cHeader := "Consec"
aCol[ 1]:nHeadStrAlign := AL_LEFT
aCol[ 1]:nDataStrAlign := AL_LEFT
aCol[ 1]:nWidth := 50
aCol[ 2] := oBrw:AddCol()
aCol[ 2]:bStrData := { || If( oRsCte:Eof, Space( nWidth ), cValtoChar( oRsCte:Fields( "ss_period" ):Value ) ) }
aCol[ 2]:cHeader := "Periodo"
aCol[ 2]:nHeadStrAlign := AL_LEFT
aCol[ 2]:nDataStrAlign := AL_LEFT
aCol[ 2]:nWidth := 50
oBrw:SetADO( oRsCte )
oBrw:CreateFromCode( )
oWChild:oClient := oBrw
ACTIVATE WINDOW oWChild MAXIMIZED VALID(oRsCte:close(),.t. )
SysRefresh()
RELEASE FONT oFontCli
return( nil )
El error
- Code: Select all Expand view
- Application
===========
Path and name: C:\Cartera\Cartera.Exe (32 bits)
Size: 1,566,208 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20140725)
FiveWin Version: FWHX 15.01
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 13 secs
Error occurred at: 05/23/15, 10:36:33
Error description: Error ADODB.RecordSet/6 DISP_E_UNKNOWNNAME: RECORDCOUNT
Args:
Stack Calls
===========
Called from: => TOLEAUTO:RECORDCOUNT( 0 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:SETADO( 4560 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:TXBROWSE( 436 )
Called from: => TXBROWSE:KEYCOUNT( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:REFRESH( 1274 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:MOUSELEAVE( 3557 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 12605 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3450 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 286 )
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 420 )
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 23 )
Called from: => TOLEAUTO:RECORDCOUNT( 0 )
Called from: .\source\classes\XBROWSE.PRG => ADOSKIP( 8422 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:SETADO( 4560 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:TXBROWSE( 442 )
Called from: => TXBROWSE:SKIP( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 1516 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1368 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1699 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 12607 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3450 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 286 )
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 420 )
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 23 )
Called from: C:\Cartera\Prg\r32_rin4.prg => (b)VHIJA( 468 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTCELL( 10376 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTDATA( 10283 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DRAWLINE( 1852 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LBUTTONDOWN( 3406 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1720 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 12607 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3450 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1152 )
Called from: C:\Cartera\Prg\r32_menu.prg => MAIN( 227 )