FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Error il贸gico al indexar.
Posts: 139
Joined: Sun Apr 23, 2006 09:00 AM
Error il贸gico al indexar.
Posted: Thu May 06, 2010 10:36 AM
Hola.

Este es el c贸digo:
1 use usuarios new
2 oMeter:nTotal := USUARIOS->( lastrec() )
3 oSay:SetText( "Indexando USUARIOS..." )
4 oSay:Refresh()

5 index on CODIGO tag CODIGO for ! deleted()
6 index on upper( NOMBRE ) tag NOMBRE for ! deleted()
7 close

Estoy teniendo un error aparentemente "il贸gico" al intentar indexar este archivo, concretamente cuando va a ejecutar la linea 5 arroja este mensaje:

Application
===========
Path and name: C:\FWH\TRABAJO\TRANSPOR\MENU.exe (32 bits)
Size: 3,307,520 bytes
Time from start: 0 hours 0 mins 17 secs
Error occurred at: 06/05/2010, 11:28:37
Error description: Error DBCMD/2001 Workarea not in use: ORDCREATE

Primero: no hay ning煤n otro archivo abierto.
Segundo: se supone que si el 谩rea de trabajo no est谩 en uso deber铆a abortar en la l铆nea 2 y no en la 5.

Este programa se encarga de indexar todos los archivos de la aplicaci贸n y el funcionamiento para cada uno de ellos es id茅ntico, as铆 que antes de llegar aqu铆 ha procesado un mont贸n de archivos m谩s sin problemas.
Si el programa lo llevo a Fivewin para Clipper ya perfectamente y usando los mismos datos.

Tengo otro programa que indexa los archivos seg煤n selecci贸n del usuario y con este en concreto no da error, siendo el c贸digo id茅ntico.

驴Alguna explicaci贸n al respecto?

Gracias y un saludo,
Fernando Morales
Un saludo,

Fernando

Las Palmas de Gran Canaria
Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Re: Error il贸gico al indexar.
Posted: Thu May 06, 2010 01:15 PM

Saludos, prueba asi, nose..digo..solo que pegue el ! de la palabra deleted()

index on CODIGO tag CODIGO for !deleted()

:shock:

Dios no est谩 muerto...



Gracias a mi Dios ante todo!
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: Error il贸gico al indexar.
Posted: Thu May 06, 2010 01:37 PM
Code (fw): Select all Collapse
#Include "FiveWin.Ch"

ANNOUNCE RDDSYS
REQUEST DBFCDX, DBFFPT

REQUEST OrdKeyNo, OrdKeyCount, OrdCreate, OrdKeyGoto

function Main()

   RDDSETDEFAULT( "DBFCDX" )

   USE USUARIOS

   IF .NOT. FILE( "USUARIOS.DBF" )
      ? [Sin usuarios...]
      QUIT
   ENDIF

   MsgMeter( { | oMeter, oText, oDlg, lEnd | ;
             BuildIndex( oMeter, oText, oDlg, @lEnd ) },;
             "Indexando USUARIOS..." )

   USE

return nil

//----------------------------------------------------------------------------//

function BuildIndex( oMeter, oText, oDlg, lEnd )

   FIELD CODIGO, NOMBRE

   oMeter:nTotal = RecCount()

   INDEX ON CODIGO TAG CODIGO TO USUARIOS ;
         EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd )

   INDEX ON UPPER(NOMBRE) TAG NOMBRE TO USUARIOS ;
         EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd )

   SET ORDER TO 01

   GO TOP

   BROWSE()

return nil

//----------------------------------------------------------------------------//


:-) :-)
Jo茫o Santos - S茫o Paulo - Brasil - Phone: +55(11)95150-7341

Continue the discussion