[Table_Exists]

Description

Link: [Table_Exists]
Author: John Burwell
Category: Database
Version: 8.x
License: Public Domain
Posted: Apr. 26, 2006
Updated: Apr. 26, 2006
More by this author...
Table_Exists accepts two parameters, a -Database string specifying a database and a -Table string specifying a table to find within that database. If the table exists, TRUE is returned. Otherwise, the tag returns FALSE.

Parameters

-Table string, required The table to find
-Database string, required The database in which to look for the table

Sample Usage

If: (Table_Exists: 'elusive_table', -Database='extant_db');
  Output: 'The table was found.';
Else;
  Output: 'The table was not found.';
/If;
						

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Define_Tag: 'Table_Exists',
  -Required='Table',
  -Required='Database';
  
  Database_TableNames: #Database;
    If: (Database_TableNameItem) == #Table;
      Return: TRUE;
    /If;
  /Database_TableNames;
  
  Return: FALSE;

/Define_Tag;

 

Related Tags



Comments

none

Email:


Password:



Newest

Most Popular

Support tagSwap.net