LassoScript Utility
Basics Browse Detail

-Database

Tag Link -Database Category Database
Type Command Source Available No
Support Preferred Version 2.5
Change Unchanged Data Source Any
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 3.x, Lasso 2.5

Description

The -Database command tag specifies the name of the database which should be used for a database action.

The value specified for this command tag can be retrieved using the [Database_Name] tag.

Syntax

[Inline: -Database='Database_Name', ...]

<a href="default.lasso?-Database=Database_Name&...">Link</a>

<form action="default.lasso" method="POST">
  <input type="hidden" name="-Database" value="Database_Name">
  ...
</form>

Parameters

Required Parameters
Database_Name The name of the database which should be used for a database action.

Examples

To specify what database to use in a database action:

Use the -Database command tag. The following example specifies a -Search action in [Inline] ... [/Inline] tags. The database Contacts is specified using a -Database command tag within the parameters of the opening [Inline] tag.

[Inline: -Search,
    -Database='Contacts',
    -Table='People',
    'First_Name'='John']
  [Records]
    <br>[Field: 'First_Name'] [Field: 'Last_Name']
  [/Records]
[/Inline]

<br>John Doe
<br>John Surname