[TOC] [Prev] [Next] [Bottom]



<@CONNECTIONS>

Syntax

<@CONNECTIONS [DSN=datasourcename] [TYPE=ODBC|DAM|FileMaker|Oracle|DLL|CommandLine|Java|
AppleEvent|Mail] [ENCODING=encoding] [{array attributes}]>

Description

The <@CONNECTIONS> meta tag provides information about each data source object currently in use by Tango Server. Tango Server considers External action connections and Mail action connections to be data sources, so information on these actions is also returned.

<@CONNECTIONS> returns a two-dimensional array with one row for each data source object (the optional attributes may be used to restrict the data source, External action, or Mail action information returned by the meta tag). Usually, data source objects represent connections. However, in some situations, Tango Server shares a single database connection between multiple data source objects. In this case, the returned NumConnections value displays the total number of shared connections.

The optional DSN attribute is used to restrict the information returned to that from data sources, External actions, or Mail actions with the specified name. If omitted, information for all data sources, External actions, or Mail actions is returned. If an invalid name is specified, an error is returned.

The optional TYPE attribute is used to restrict the information returned to data sources with the specified type, External actions of the specified type, or Mail actions. The type must be one of the listed values. If omitted, information for all data source types, External actions, and Mail actions is returned. If an invalid type is specified, an error is returned.

There are array-returning attributes that can be used to specify prefixes and suffixes for the returned array, rows within the array, and columns within the rows. They are described in the section Array-to-Text Conversion Attributes. By default, the returned array is formatted as an HTML table.

For more information on External actions and Mail actions, see Chapter 15 and Chapter 16 of the User's Guide.

Mail and External actions are treated as data sources by Tango Server. Specifying DLL (DLL-type External action), CommandLine (command-line External action), Java (Java External action), AppleEvent (AppleEvent External action), or Mail (Mail action) in the TYPE attribute returns information on these actions.

<@CONNECTIONS> returns a two-dimensional array, containing the following columns:

Category

Description

Version

Version of <@CONNECTIONS> information. Will return "1" for the initial version of this meta tag.

Name

Data source: returns the name of the data source.
Mail actions: returns the host/port of the mail server.
Command line: returns the name of the last command to be executed.
DLL: returns the name of the DLL.

Type

Data source, External action, or Mail action type (ODBC | DAM | FileMaker | Oracle | DLL | CommandLine | Java | AppleEvent | Mail).

Info

Additional information about the connection (for example, ODBC driver name and version). The information returned depends on the data source driver. Empty for External and Mail actions.

UserName

User name (after tag substitution) used to connect to the data source. Blank if no user name was specified.

NumConnections

Number of physical connections to this data source. Not used for External and Mail actions.

MinutesOpened

Number of minutes the connection to the data source has been opened.

MinutesIdle

Number of minutes since a query was last executed by the connection.

LastUsedBy

The user reference of the last user whose query was processed by this connection.

ErrorsGenerated

Number of errors generated during execution.


! Note: Row 0 of the array returned by <@CONNECTIONS> contains the column titles listed in the Category column of the above table. You can return the category names by using the following meta tags:

<@ASSIGN local$tempArray value=<@CONNECTIONS>>

<@VAR local$tempArray[0,*]>

<@VAR local$tempArray>


Example

<@CONNECTIONS>

Returns a two-dimensional array listing all open connections for all data sources.

<@CONNECTIONS TYPE=ODBC>

Returns a two-column array listing all open ODBC data sources.

See Also

Array-to-Text Conversion Attributes
Encoding Attribute
<@CUSTOMTAGS>



[TOC] [Prev] [Next] [Bottom]



docs@pervasive.com

Copyright © 1999, Pervasive Software. All rights reserved.