Lasso Soft Inc. > Home

[Table_Exists]

LinkTable_Exists
AuthorJohn Burwell
CategoryDatabase
Version8.x
LicensePublic Domain
Posted26 Apr 2006
Updated26 Apr 2006
More by this author...

Description

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.

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.

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

No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft