AppDB ReadTextWithSQL() Method

(SBM On-Premise/PaaSonly) Reads any single varchar value, up to 256 characters, out of the database.

Function Signature

 string ReadTextWithSQL( sqlText [, Vector params] )

Parameters

Parameter Type Description

sqlText

string

The SQL to invoke.

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.

Return

Type Description

string

The value that was read from the database.

Technical Details

SBM ModScript version: 11.3.

Example

Shell.Db.ReadTextWithSQL( 
    "select TS_DBNAME from TS_TABLES where TS_ID=1000 and TS_TYPE=1" );

Or:

Shell.Db.ReadTextWithSQL(
    "select TS_DBNAME from TS_TABLES where TS_ID=? and TS_TYPE=?", 
    [ Pair(DBTypeConstants.INTEGER,1000), Pair(DBTypeConstants.INTEGER,1)] );

Notes

None.

Related Topics

AppDb