You'd probably be better off to simply issue a 'Close All' staement. That's faster, too.
On Tue, 26 Oct 2004, Lukas, Paul wrote: > > > One of my users gets this error on occasion (it doesn't happen all the > > time) in a MapBasic application I created.. > > > > We are using MapInfo 7.8 on Win2000 computers SP3. > > > > The application is trying to close all open tables, but sometimes, and I > > can't track down the circumstances, he gets the error: > > > > "Cannot find Table 1" > > > > Here is the code: > > numtabs = numtables() > > if numtabs > 0 then > > for i = 1 to numtabs > > tabname = tableinfo(1, TAB_INFO_NAME) > > close table tabname > > next > > end if > > > > I figure if there is a table open, there will always be a "table 1". I > > cannot figure out why this error is occuring, and why it only happens > > every once in a while. Any ideas? > > > > --------------------------------------------------------------------- > List hosting provided by Directions Magazine | www.directionsmag.com | > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Message number: 13830 > --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 13831
