Difference between revisions of "Extensions.SQL.CloseConnection"
Jump to navigation
Jump to search
(→Properties: Edited by Ngoc Tran.) |
(Edited by Ngoc Tran.) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:OTX '''CloseConnection'''}}[[Category:SQL]] | {{DISPLAYTITLE:OTX '''CloseConnection'''}}[[Category:SQL]] | ||
== Classification == | == Classification == | ||
− | {{ClassificationActivity | CloseConnection | Closes the current connection | [[Action]] | [[Extensions. | + | {{ClassificationActivity | CloseConnection | Closes the current connection | [[Action]] | [[Extensions.SQL | OTX SQL extension]] | [[Extensions.SQL#Actions | SQL related Actions]]| [[Extensions.SQL.ConnectionException|ConnectionException]] | -|}} |
== OTL Syntax == | == OTL Syntax == | ||
Line 9: | Line 9: | ||
== Description == | == Description == | ||
− | The '''CloseConnection''' action closes the current connection and releases any resources associated with the current connection. The use of '''CloseConnection''' is optional. An OTX runtime system | + | The '''CloseConnection''' action closes the current connection and releases any resources associated with the current connection. The use of '''CloseConnection''' is optional. An OTX runtime system will automatically close any open connection at an appropriate time, e.g. at the end of the runtime execution. If a sequence uses a connection after it is been closed by a '''CloseConnection''' action, the runtime system will throw an [[Core.DataTypes.ComplexDataType.InvalidReferenceException|otx:InvalidReferenceException]]. |
== Properties == | == Properties == | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie2| | + | {{TableRowPropertie2| connection| [[Extensions.SQL.Connection|Connection]] | [[Variable]] | - | [1..1] | This element represents the specified connection variable that shall be closed.}} |
|} | |} | ||
Line 43: | Line 43: | ||
== See also == | == See also == | ||
− | [[Extensions. | + | {| {{TableHeader}} |
− | [[Extensions. | + | {{TableRowKeyValueList|[[Extensions.SQL.CloseConnection|CloseConnection]]|}} |
− | [[Extensions. | + | {{TableRowKeyValueList|[[Extensions.SQL.ExecuteQuery|ExecuteQuery]]|}} |
− | [[Extensions. | + | {{TableRowKeyValueList|[[Extensions.SQL.ExecuteUpdate|ExecuteUpdate]]|}} |
− | [[Extensions. | + | {{TableRowKeyValueList|[[Extensions.SQL.ConnectionTerm|ConnectionTerm]]|}} |
− | [[Extensions. | + | {{TableRowKeyValueList|[[Extensions.SQL.ConnectionValue|ConnectionValue]]|}} |
+ | {{TableRowKeyValueList|[[Extensions.SQL.CreateConnection|CreateConnection]]|}} | ||
+ | {{TableRowKeyValueList|[[Extensions.SQL.GetResultValueAsBoolean|GetResultValueAsBoolean]]|}} | ||
+ | {{TableRowKeyValueList|[[Extensions.SQL.GetResultValueAsByteField|GetResultValueAsByteField]]|}} | ||
+ | {{TableRowKeyValueList|[[Extensions.SQL.GetResultValueAsFloat|GetResultValueAsFloat]]|}} | ||
+ | {{TableRowKeyValueList|[[Extensions.SQL.GetResultValueAsInteger|GetResultValueAsInteger]]|}} | ||
+ | {{TableRowKeyValueList|[[Extensions.SQL.GetResultValueAsString|GetResultValueAsString]]|}} | ||
+ | {{TableRowKeyValueList|[[Extensions.SQL.NextResult|NextResult]]|}} | ||
+ | {{TableRowKeyValueList|[[Extensions.SQL.ResultSetTerm|ResultSetTerm]]|}} | ||
+ | {{TableRowKeyValueList|[[Extensions.SQL.ResultSetValue|ResultSetValue]]|}} | ||
+ | |} |
Latest revision as of 09:37, 24 September 2019
Classification
Name | CloseConnection |
Short Description | Closes the current connection |
Class | Action |
Extension | OTX SQL extension |
Group | SQL related Actions |
Exceptions | ConnectionException |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
ActionRealisation SQL.CloseConnection(ConnectionVariable connection);
Description
The CloseConnection action closes the current connection and releases any resources associated with the current connection. The use of CloseConnection is optional. An OTX runtime system will automatically close any open connection at an appropriate time, e.g. at the end of the runtime execution. If a sequence uses a connection after it is been closed by a CloseConnection action, the runtime system will throw an otx:InvalidReferenceException.
Properties
Name | Data Type | Class | Default | Cardinality | Description |
connection | Connection | Variable | - | [1..1] | This element represents the specified connection variable that shall be closed. |
OTL Examples
/// Local Declarations
SQL.Connection Connection1;
Exception Exception1;
/// Flow
try
{
Connection1 = SQL.CreateConnection("DRIVER={SQL Server};Server=.;InitialCatalog=classicmodels;username=sa;password=saas");
}
catch (Exception)
{
Connection1 = SQL.CreateConnection("jdbc:sqlserver://localhost;databaseName=classicmodels;username=sa;password=saas");
}
catch (Exception Exception1)
{
throw Exception1;
}
SQL.CloseConnection(Connection1);