KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Checking a table number to see if a table still exists
PRODUCT: 4D Developer | VERSION: 11 | PLATFORM: Mac & Win
Published On: January 31, 2008

New to 4D v11 SQL is the ability to delete tables. There may be a situation, then, that will require you to check if a table number is still valid or not.

The command to do this is "Is table number valid", which returns a True if the table still exists in the database, or False if it has been deleted or is in the Trash.

Commented by Luis on July 17, 2009 at 3:22 PM
The same applies to fields. You also need to check whether a field exists or not.

The command to check is: Is field number valid (tableNum | tablePtr; fieldNum) -> Boolean
It will return True is the field still exists in the database or False if it was deleted or is in the Trash.