LassoScript Utility
Basics Browse Detail

-Host

Tag Link -Host Category Database
Type Command Source Available Yes
Support Preferred Version 8.5
Change New Data Source Any
Output Type None Security None
Implementation Sets Lasso 8.5

Description

-Host allows a data source host to be specified entirely within an inline tag. Using this parameter allows a data source to be accessed without first setting up the data source in Lasso Security. When this parameter is used Lasso security is not consulted about the data source request so the security of the data must be controlled within the data source itself.

The -Host parameter requires an array value which include keyword/value pairs specifying the characteristics of the data source host. This format is very similar to how parameters are specified for the inline itself. The example syntax shows an inline using a MySQL data source host on the local machine using the default 'root' user with no password.

The -Host parameter in a nested inline can also take a value of 'Inherit' to inherit the data source host from the surrounding inline. See below for more details.

The possible values for the -Host array include the following. More information about each of these parameters can be found in the documentation of each Lasso data source in the Setup Guide. These values also mirror the values that are set in Lasso Site Administration when setting up a new data source in the Setup > Data Sources section.

-Datasource is required and specifies the type of data source host that is being created. Either the friendly or internal name of data source connectors can be used.

-Name is required for most data sources and specifies the IP address, host name, or connection string for the data source host.

-Port is optional and specifies an alternate port for connecting to a remote data source. This value defaults to an appropriate value for most data sources. The -Port may be used for other purposes in some data sources.

-Username and -Password are optional and specify the authentication information for the data source.

-TableEncoding specifies an optional table encoding for the data source. All data sources will default to using UTF-8 as their character set unless the encoding is specified explicitly using this parameter.

-Schema and -Extra are required by some data sources. See the documentation in the Lasso Setup Guide for more details.

Nested inlines will inherit the host and database from the outer inline provided they do not specify a different -Database. If they do specify a different -Database they must use -Host='Inherit' in order to inherit the settings of the outer inline. Otherwise, the specified database will be looked up in Lasso Security.

Syntax

[Inline: -Host=(Array: -Datasource='MySQLDS', -Name='127.0.0.1', -Username='Root', -Password=''), -Database='MyDatabase', -Table='MyTable', -FindAll, -MaxRecords='all']
...
[/Inline]

Parameters

Required Parameters
Host Array An array of pairs specifying the attributes of the data source host.

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.