Hola, donde puedo conseguir la ultima version de esta estupenda clase ya la uso pero estoy implementando un browse con ADO y me da el siguiente error:
Error description: Error BASE/1002 Alias does not exist: ARRAY
Stack Calls
===========
Called from (b)TWBROWSE:SETFILTER(2639)
Called from (b)TWBROWSE:SETFILTER(2640)
Called from TWBROWSE:LBUTTONDOWN(1649)
Called from TWINDOW:HANDLEEVENT(0)
Called from TWBROWSE:HANDLEEVENT(0)
Called from _FWH(3109)
Called from DIALOGBOXINDIRECT(0)
Called from TDIALOG:ACTIVATE(0)
Called from TBUSCARR:BUSQUEDA(67)
Called from BUS_PRO(45)
Called from ZPROVEE(33)
Called from VAL_PROV(245)
Called from (b)C22011(76)
Called from TGET:LVALID(0)
Called from TGET:FWLOSTFOCUS(0)
Called from TGET:HANDLEEVENT(0)
Called from _FWH(3109)
Called from SYSREFRESH(0)
Called from TCONTROL:KEYCHAR(0)
Called from TGET:KEYCHAR(0)
Called from TWINDOW:HANDLEEVENT(0)
Called from TGET:HANDLEEVENT(0)
Called from _FWH(3109)
Called from WINRUN(0)
Called from TWINDOW:ACTIVATE(878)
Called from MAIN(76)
este es mi codigo:
@ 10,00 LISTBOX oLbx1 FIELDS oRecordSet:Fields(0):value,;
oRecordSet:Fields(1):value;
ON DBLCLICK (odlgbus:end(),wr:=.t.) ;
SIZE 258,68 OF oDlgbus PIXEL
olbx1:aheaders := ::titulos
olbx1:acolsizes := ::sizes
oLbx1:aJustify := ::just
olbx1:aHJustify := ::justh
oLbx1:bLogicLen = { || oRecordSet:RecordCount }
oLbx1:bGoTop = { || oRecordSet:MoveFirst() }
oLbx1:bGoBottom = { || oRecordSet:MoveLast() }
oLbx1:bSkip = { | nSkip | Skipper( oRecordSet, nSkip ) }
oLbx1:cAlias := "ARRAY"
Gracias desde ya
donde consigo la ultima vercio de Wbrowse Hernan?
rene ya la puse pero ahora me da el siguiente error en el skipper dentro de la busqueda:
Application
===========
Path and name: f:\SIV\NXTMenu.Exe (32 bits)
Size: 2,594,816 bytes
Time from start: 0 hours 0 mins 25 secs
Error occurred at: 28/07/2006, 15:27:42
Error description: Error adodb.command:EXECUTE/9 El conjunto de filas no admite desplazamiento hacia atrás.: MOVE
Args:
[ 1] = N -7
Stack Calls
===========
Called from TOLEAUTO:MOVE(0)
Called from SKIPPER(81)
Called from (b)TBUSCARR:BUSQUEDA(61)
Called from TWBROWSE:SKIP(2355)
Called from TWBROWSE:PAINT(1091)
Called from TWBROWSE:DISPLAY(2880)
Called from TWBROWSE:HANDLEEVENT(0)
Called from _FWH(3109)
Called from DIALOGBOXINDIRECT(0)
Called from TDIALOG:ACTIVATE(0)
Called from TBUSCARR:BUSQUEDA(73)
Called from BUS_PRO(45)
Called from ZPROVEE(33)
Called from VAL_PROV(245)
Called from (b)C22011(76)
Called from TGET:LVALID(0)
Called from TGET:FWLOSTFOCUS(0)
Called from TGET:HANDLEEVENT(0)
Called from _FWH(3109)
Called from SYSREFRESH(0)
Called from TCONTROL:KEYCHAR(0)
Called from TGET:KEYCHAR(0)
Called from TWINDOW:HANDLEEVENT(0)
Called from TGET:HANDLEEVENT(0)
Called from _FWH(3109)
Called from WINRUN(0)
Called from TWINDOW:ACTIVATE(878)
Called from MAIN(76)
este es el codigo:
STATIC FUNCTION SKIPPER( oRs, nSkip )
LOCAL nRec := oRs:AbsolutePosition
oRs:Move( nSkip )
IF oRs:EOF()
oRs:MoveLast()
endif
IF oRs:BOF()
oRs:MoveFirst()
ENDIF
RETURN oRs:AbsolutePosition - nRec
Application
===========
Path and name: f:\SIV\NXTMenu.Exe (32 bits)
Size: 2,594,816 bytes
Time from start: 0 hours 0 mins 25 secs
Error occurred at: 28/07/2006, 15:27:42
Error description: Error adodb.command:EXECUTE/9 El conjunto de filas no admite desplazamiento hacia atrás.: MOVE
Args:
[ 1] = N -7
Stack Calls
===========
Called from TOLEAUTO:MOVE(0)
Called from SKIPPER(81)
Called from (b)TBUSCARR:BUSQUEDA(61)
Called from TWBROWSE:SKIP(2355)
Called from TWBROWSE:PAINT(1091)
Called from TWBROWSE:DISPLAY(2880)
Called from TWBROWSE:HANDLEEVENT(0)
Called from _FWH(3109)
Called from DIALOGBOXINDIRECT(0)
Called from TDIALOG:ACTIVATE(0)
Called from TBUSCARR:BUSQUEDA(73)
Called from BUS_PRO(45)
Called from ZPROVEE(33)
Called from VAL_PROV(245)
Called from (b)C22011(76)
Called from TGET:LVALID(0)
Called from TGET:FWLOSTFOCUS(0)
Called from TGET:HANDLEEVENT(0)
Called from _FWH(3109)
Called from SYSREFRESH(0)
Called from TCONTROL:KEYCHAR(0)
Called from TGET:KEYCHAR(0)
Called from TWINDOW:HANDLEEVENT(0)
Called from TGET:HANDLEEVENT(0)
Called from _FWH(3109)
Called from WINRUN(0)
Called from TWINDOW:ACTIVATE(878)
Called from MAIN(76)
este es el codigo:
STATIC FUNCTION SKIPPER( oRs, nSkip )
LOCAL nRec := oRs:AbsolutePosition
oRs:Move( nSkip )
IF oRs:EOF()
oRs:MoveLast()
endif
IF oRs:BOF()
oRs:MoveFirst()
ENDIF
RETURN oRs:AbsolutePosition - nRec
ahi va:
oConexionAdo := TOLEAUTO():New("adodb.connection")
oComando := TOLEAUTO():New("adodb.command")
oConexionAdo:Open("Provider=Advantage.OLEDB.1;User ID=adssys;Data Source="+xrutab+"dd.add;Persist Security Info=False;ServerType="+xservidor+";LockMode=ADS_COMPATIBLE_LOCKING")
oComando:ActiveConnection(oConexionAdo)
cQuery := 'SELECT '+::campos+' FROM '+::base+' ORDER BY '+::orden
oComando:CommandText := cQuery
oRecordSet := oComando:Execute()
es todo:
oConexionAdo := TOLEAUTO():New("adodb.connection")
oComando := TOLEAUTO():New("adodb.command")
oConexionAdo:Open("Provider=Advantage.OLEDB.1;User ID=adssys;Data Source="+xrutab+"dd.add;Persist Security Info=False;ServerType="+xservidor+";LockMode=ADS_COMPATIBLE_LOCKING")
oComando:ActiveConnection(oConexionAdo)
cQuery := 'SELECT '+::campos+' FROM '+::base+' ORDER BY '+::orden
oComando:CommandText := cQuery
oRecordSet := oComando:Execute()
es todo:
No señor, te falta definir el tipo del cursor en el RecordSet, por eso no te puedes mover sobre el browse.
Necesitas hacer lo siguiente:
Es muy importante que el Tipo de cursor del recordset lo pongas como adOpenKeySet para que te puedas mover, de lo contrario solo puedes ir hacia adelante y no hacia atras.
Necesitas hacer lo siguiente:
Code: Select all
*---- CursorTypeEnum Values ----
#DEFINE adOpenForwardOnly 0
#DEFINE adOpenKeyset 1
#DEFINE adOpenDynamic 2
#DEFINE adOpenStatic 3
*---- LockTypeEnum Values ----
#DEFINE adLockReadOnly 1
#DEFINE adLockPessimistic 2
#DEFINE adLockOptimistic 3
#DEFINE adLockBatchOptimistic 4
oMiConexion := TOleAuto():New(“adodb.connection”)
oMiConexion:Open("Provider=Advantage.OLEDB.1;User ID=adssys;Data Source="+xrutab+"dd.add;Persist Security Info=False;ServerType="+xservidor+";LockMode=ADS_COMPATIBLE_LOCKING")
oRecordSet := TOleAuto():New(“adodb.recordset”)
oRecordSet:LockType := adLockOptimistic
oRecordSet:CursorType := adOpenKeySet
oRecordSet:ActiveConnection(oMiConexion)
oRecordSet:Source := 'SELECT '+::campos+' FROM '+::base+' ORDER BY '+::orden
oRecordSet:Open()
Saludos
R.F.
R.F.