David,

Create a function like the following:

Function IsTableOpen(byval sTablename as String) as logical
dim sDummy as string
Onerror goto errhandle

'----- just run a tableinfo command to see if ok ----
        sDummy = tableinfo(sTablename.TAB_INFO_NAME)

'----- if no error then table must be open!
        istableopen = TRUE
Exit function
Errhandle:
' ----- Error generated so table is not open - You could explicity set
return value if you want i.e istableopen = FALSE
End function

Then you call it like

If IstableOpen("a table name") then
        ' --- do some processing
Else
       ' ---- table is not open message!
End if


This should do the trick!

Regards

Martin

----- Original Message -----
From: "Windeler, David" <[EMAIL PROTECTED]>
To: "'MapInfo-L (E-mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 2:09 PM
Subject: MI-L re table status


> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
>
>
> To whom it may concern:
>
> I was just wondering if someone could give me a hand. I am trying to
format
> an if...then...else statement to check if the status of a table is open or
> not. How do I check to see if a table is open or not?
>
> David Windeler
> GIS Technician
> City Of Vaughan
>
> Engineering Department
> 2141 Major Mackenzie Drive
> Vaughan, Ontario
> L6A 1T1
>
> Tel. (905) 832-8525 Ext. 8747
> Fax (905) 832-6145
> E-mail [EMAIL PROTECTED]
>
>
>
>
>
> _______________________________________________________________________
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, send e-mail to [EMAIL PROTECTED] and
> put "unsubscribe MapInfo-L" in the message body.
>



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to