>I have a routine that RE-INDEX about 54 files. When I go to reindex the files i get to reindex all of them. In other machines I get a message saying: TOO MANY FILES OPEN.
>
>Any clue on this message?
>Thanks.
Hidy Sergio,
Consider the following suggestion. First, create a function to do an exclusive open on a table. The table should be in the current work area upon return. Have it return a logical value. If the function succeeds, do your re-indexing and then close the table. You could then write a procedure to do the work, closing the file when it's done. This should elminate the problem. Since you have a number of tables, pass an array containing the table names to it. I might look something like this:
PROCEDURE ReIndexTables
LPARAMETER pa_tables
EXTERNAL ARRAY pa_tables
LOCAL lni, lnlast
lnlast = ALEN(pa_tables, 1)
FOR lni = 1 TO lnlast
IF ExclOpen(pa_tables[lni])
REINDEX
USE
ENDIF
ENDFOR
ENDPROC
hth,
George
Ubi caritas et amor, deus ibi est