SQL_CHECK_TABLE

Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex

Use this command to verify that a given table exists on the SQL backend. This command takes three arguments, a string containing the name of the database, a string containing the name of the user and finally a string containing the name of the table being checked. If the table exists, the program proceeds normally. If the table does not exist then the flag “finderr” is set to true. Note that in order to handle the error a check must be done on the “finderr” variable.

Syntax

SQL_CHECK_TABLE {database} {username} {table}

Parameter

Description

database

Name of the database

username

Name of the user

table

Name of the table being checked

Example

SQL_CHECK_TABLE "testDB" "user" "Customer"
If (finderr) Begin
    Showln "This table does not exist"
End