Extensions.SQL.GetResultValueAsByteField
Jump to navigation
Jump to search
Contents
Classification
Name | GetResultValueAsByteField |
Short Description | Returns the value of the given column inside the row as a ByteField. |
Class | Term |
Extension | OTX SQL extension |
Group | SQL related Terms |
Exceptions | OutOfBoundsException TypeMismatchException |
Checker Rules | SQL_Chk001 |
Standard Compliant | Yes |
OTL Syntax
ByteFieldTerm SQL.GetResultValueAsByteField(ResultSetTerm resultSet, SimpleTerm column);
Description
The GetResultValueAsByteField returns the value of the given column (via index or name) inside the row as a ByteField.
Return Value
The Term returns the value, see table below.
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
ByteField | The value of the given column inside the row as a ByteField. |
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;
ByteField ByteField1;
/// 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
{
ByteField1 = SQL.GetResultValueAsByteField(ResultSet1, 9);
}
SQL.CloseConnection(Connection1);