SBM ModScript Reference → Programming SBM ModScript → Object Types → AppDb → AppDB ReadTextValsWithSQL() Method
(SBM On-Premise/PaaS only) Reads multiple rows of a single text column from the database, filling the Vector "out".
| Parameter | Type | Description | 
|---|---|---|
| sqlText | string | The SQL to invoke. | 
| out | Vector& | The results of the query. Each entry in the Vector will be a string. | 
| params | Vector | An optional Vector storing SQL bind parameters, where each entry is a Pair, with the first value as the parameter type and the second value as the value to bind to the SQL parameter. Corresponds to DBTypeConstants. | 
| Type | Description | 
|---|---|
| bool | Returns true if successful; false otherwise. A successful read may return zero results if no items match the query. Check for results by calling the Vector.empty() method. | 
SBM ModScript version: 11.3.
var v = [];
Shell.Db.ReadTextValsWithSQL(
    "select TS_DBNAME from TS_TABLES where TS_TYPE=1", v );
Shell.Db.ReadTextValsWithSQL(
    "select TS_DBNAME from TS_TABLES where TS_TYPE=?", v, 
    [Pair(DBTypeConstants.INTEGER,1)] );
 
    None.
Copyright © 2007–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.