Hello Randy,

> I have some MapBasic code which contains an EndHandler routine which
> performs some scrap-file cleanup.  It works fine with any number of
> tables/configurations open, EXCEPT when I have a table open that is the
> results of a SQL grouped-by function  (eg  Query1 is a grouped-by table
> based on a SQL query of a base table).  In that scenario, when the program
> is ended or I exit MapInfo, the end handler produces an error of:
> 
> File #0 not registered for access.

Have you tried just dropping the tables of type TAB_INFO_BASE? I think the problem may 
be in the  
use of table file names for the result tables. I haven't tested it, but try the 
following;

   For i = NumTables() to 1 Step -1
      If TableInfo(i, TAB_INFO_TYPE) = TAB_TYPE_BASE then
         Drop Table TableInfo(i,TAB_INFO_NAME)
     End If
   Next

In theory the result tables should close by themselves.

Regards,
Warren Vick
Europa Technologies Ltd, U.K.
www.europa-tech.com
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to