PROBLEMAS CON ADS Y MSGMETER

PROBLEMAS CON ADS Y MSGMETER

Postby JARO » Wed Feb 06, 2008 5:35 pm

Tengo una aplicacion que funciona con DBFCDX, al pasarla a ADS tengo un problema visual para saber que porporción lleva de indice con MSGMETER


*****************************************
*la parte del codigo que llama a ADS está correcta
*OJO FUNCIONA PERFECTAMENTE CON DBFCDX
*****************************************
USE clientes NEW
INDEXA("PROCESANDO CODIGO EMPRESA","CODIGO","CODIGO")
RETURN NIL

function indexa(TITULO,CAMPO,TAGCDX)
MsgMeter( { | oMeter, oText, oDlg, lEnd | ;
BuildIndex( oMeter, oText, oDlg, @lEnd ,;
CAMPO, TAGCDX ) } ,;
OemToAnsi(TITULO) ,;
OemToAnsi("Procesando ¡ndices") )
RETURN NIL

FUNCTION BuildIndex( oMeter, oText, oDlg, lEnd, campo, ARCHIVO )
oMeter:nTotal = LASTREC()
OrdSetFocus(0)
INDEX ON &(Campo) TAG &(ARCHIVO) ;
EVAL ( oMeter:Set( RecNo() ), MSGINFO(RECNO()), oMeter:REFRESH() ,ODLG:REFRESH(),SysRefresh(), ! lEnd )
RETURN NIL
***********************************

Dicho código con DBFCDX me informa perfectamente del la proporcion del indice que lleva efectuada.... pero en cambio con ADS no me aparece absolutamente nada. Mi pregunta es ADS entiende?
INDEX ON &(Campo) TAG &(ARCHIVO) ;
EVAL ( oMeter:Set( RecNo() ), MSGINFO(RECNO()), oMeter:REFRESH() ,ODLG:REFRESH(),SysRefresh(), ! lEnd )
JARO
 
Posts: 30
Joined: Thu Oct 25, 2007 7:54 pm

Postby carlos vargas » Wed Feb 06, 2008 9:45 pm

ADS no permitre el uso de EVAL, simplemete lo ignora.
Existe una forma de saber el avance del proceso de la indexacion con ADS.

tomado del doc de rddads
Code: Select all  Expand view

       FUNCTION Main()
          ...
          AdsRegCallBack( {|nPercent| outputstuff(nPercent)}  )
          /* The above codeblock will be called approximately
               every 2 seconds while indexing.
               The codeblock can return .T. to abort.   */
          INDEX ON First+LAST+LABEL1+LABEL2 TAG First
          AdsClrCallBack()
          ...
       RETURN nil

       FUNCTION outputstuff(nPercent)  /* The "callback" function */
          ? "output stuff", nPercent
       RETURN inkey() == 27

       /*  If press ESC, returns .T. to abort.   */

     
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1708
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Postby JARO » Thu Feb 07, 2008 12:37 pm

SOLUCIONADO

MUCHA, MUCHISIMAS GRACIAS
JARO
 
Posts: 30
Joined: Thu Oct 25, 2007 7:54 pm

Postby Ale SB » Thu May 01, 2008 5:32 pm

No consigo criar los indecis com ADS e msgmeter :

Code: Select all  Expand view
REQUEST ADS , ADSKeyno, ADSKeycount, AdsGetRelKeyPos, AdsSetRelKeyPos

FUNCTION MAIN()

RddRegister( "ADS", 1 )
RddSetDefault( "ADS" )
AdsLocking( .T. )
AdsRightsCheck( .F. )
AdsSetFileType( 2 ) /// 1 NTX / 2 CDX / 3 ADT
AdsSetServerType(2) /// 1 Local / 2 Server / 7 AIS Internet
AdsSetDateFormat("DD/MM/YYYY")
AdsSetEpoch("01/01/2000")
AdsTestRecLocks(.T.)
ADSCACHEOPENTABLES(40)

  Use "&cCamServDados\PDN_SP.Dbf" New
 
  MsgMeter( { | oMeter, oText, oDlg, lEnd | ;
             BuildIndex( oMeter, oText, oDlg, @lEnd ) },;
             "Building the Index..." )
  use


Code: Select all  Expand view
Function BuildIndex( oMeter, oText, oDlg, lEnd )

   AdsRegCallBack( {|nPercent| outputstuff(nPercent),SysRefresh(),.t.} )
   Index on NM TAG 1 To "&cCamServDados\iPDN_SP.Dbf"
   
   AdsClrCallBack()

return nil
//----------------------------------------------------------------------------//
FUNCTION outputstuff(nPercent)  /* The "callback" function */
          ? "output stuff", nPercent
       RETURN inkey() == 27


Erro.Log
Code: Select all  Expand view
Error description: Error ADSCDX/7089  Erro de cria‡Æo: C:\Prog_Fwh\FwH804_xHb100\Bn_Dbf\SB_Dados\iPDN_SP.Dbf


Oque esta errado ???

Saludos Ale
aleseribeli@hotmail.com

FwH, Hb Svn, ADS 8.1, ADS 10, Pelles C, FwPPC, MsVc 2008, MsVc 2010
"Conhecimento, você não subtrai quando divide; mas soma e multiplica."
**---Mário Persona---**
User avatar
Ale SB
 
Posts: 248
Joined: Wed Jan 11, 2006 11:30 am
Location: Campo Grande-MS / Brasil


Return to FiveWin para Harbour/xHarbour

Who is online

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