0

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?

3

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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