f2s_check_sql_table_exists¶
Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers
Syntax
f2s_check_sql_table_exists {table name} {owner} {db name} to {variable}
Parameter |
Description |
---|---|
table name |
Name of the table being checked |
owner |
Name of the owner or schema |
db name |
Name of the database |
variable |
Result Boolean variable |
Description
Use this command to verify that a given SQL table exists. This command takes four arguments, a string containing the table name, a string containing the name of the schema, the database name, and finally a string containing the name of the table being checked. If the table exists, the program proceeds normally. If the table exists the Found indicator will be set to True.
The optional “using” syntax allows you to pass around the interface created by this command. The variable passed MUST be a variant. This allows for multiple statements to be active concurrently in some cases. If you use the “using” syntax, it must be used on all subsequent commands. Mixing the using syntax is not supported. So for instance, if you plan on having multiple statements active concurrently, all active statements must make use of the using syntax.
Example
- f2s_esql_set_param Command
// f2s_check_sql_table_exists {table name} {owner} {db name} to {variable} Boolean bTableExists String sTableName Move "Customer" to sTableName f2s_check_sql_table_exists "Customer" "dbo" "OrderEntry" to bTableExists If (bTableExists) Begin Showln ("The" * sTableName * "table was Found") inkey WindowIndex End
Related Commands
Replaces: SQL_CHECK_TABLE