donde consigo la ultima vercio de Wbrowse Hernan?

donde consigo la ultima vercio de Wbrowse Hernan?

Postby alex_cyr » Fri Jul 28, 2006 4:55 pm

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 :)
alex_cyr
 
Posts: 77
Joined: Wed Jun 28, 2006 6:38 pm
Location: Chihuahua

Postby R.F. » Fri Jul 28, 2006 9:20 pm

Te falta la funcion Skipper() que esta en el ::Bskip
Saludos
R.F.
R.F.
 
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Postby alex_cyr » Fri Jul 28, 2006 9:34 pm

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
alex_cyr
 
Posts: 77
Joined: Wed Jun 28, 2006 6:38 pm
Location: Chihuahua

Postby alex_cyr » Fri Jul 28, 2006 9:35 pm

de hecho si compilo el codigo que tu me pasaste me da el mismo error
alex_cyr
 
Posts: 77
Joined: Wed Jun 28, 2006 6:38 pm
Location: Chihuahua

Postby R.F. » Sat Jul 29, 2006 6:52 am

Cuando estas creando el Recordset, ¿ que tipo de cursor estas usando ?

¿ Puedes poner tu cadena de conexion y la creacoin del RecordSet ?
Saludos
R.F.
R.F.
 
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Postby alex_cyr » Mon Jul 31, 2006 11:15 pm

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: :roll:
alex_cyr
 
Posts: 77
Joined: Wed Jun 28, 2006 6:38 pm
Location: Chihuahua

Postby R.F. » Tue Aug 01, 2006 6:27 pm

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:

Code: Select all  Expand view  RUN
*---- 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()


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.
Saludos
R.F.
R.F.
 
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 56 guests