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
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

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.