Classification
OTL Syntax
BooleanTerm SQL.GetResultValueAsBoolean(ResultSetTerm resultSet, SimpleTerm column);
Description
The GetResultValueAsBoolean returns the value of the given column (via index or name)
inside the row as a Boolean.
Return Value
The Term returns the value, see table below.
|
|
In OTX, Terms are categorized according to its return data type!
|
Data Type |
Description
|
Boolean |
The value of the given column (via index or name) inside the row as a Boolean.
|
Properties
Name |
Data Type |
Class |
Default |
Cardinality |
Description
|
resultSet |
ResultSet |
Term |
- |
[1..1] |
This element represents the ResultSet from which the value of the current row will be read.
|
column |
Simple |
Term |
- |
[1..1] |
This element represents the column from which the value will be read. A column can be accessed via name or via index. Therefore the data type of the column property will be String (name) or Integer (index).
|
OTL Examples
/// Local Declarations
SQL.Connection Connection1;
SQL.ResultSet ResultSet1;
Boolean Boolean1;
/// Flow
try
{
// for DotNet platform
Connection1 = SQL.CreateConnection("DRIVER={SQL Server};Server=.;InitialCatalog=classicmodels;username=sa;password=saas");
}
catch (Exception)
{
// for Java platform
Connection1 = SQL.CreateConnection("jdbc:sqlserver://localhost;databaseName=classicmodels;username=sa;password=saas");
}
SQL.ExecuteQuery(Connection1, "select * from classicmodels.dbo.orders", ResultSet1);
while (SQL.NextResult(ResultSet1)) : WhileLoop1
{
Boolean1 = SQL.GetResultValueAsBoolean(ResultSet1, "hasComments");
}
SQL.CloseConnection(Connection1);
See also