Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

How do I check whether a table is mappable?

I am trying to select all records from a table that contain objects, like this:

Select * From TableName Where Obj Into TempTable

If a table doesn't have an Obj column then this will cause an error. How can I check for the existance of the Obj column?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

You can use the TableInfo() function to query a table for a number of attributes, one is whether it is mappable.

Try:

If TableInfo(TableName, TAB_INFO_MAPPABLE) Then
   Select * From TableName Where Obj Into TempTable
End if
share|improve this answer
    
Perfect. Thanks! –  Mr_Chimp Dec 22 '11 at 16:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.