AppDB ReadIntWithSQL() Method

(SBM On-Premise/PaaS only) Reads any single integer out of the database.

Function Signature

 int ReadIntWithSQL( sqlText [, Vector params] )

Parameters

Parameter Type Description

sqlText

string

The SQL to pass in.

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

int

The int value from the database.

Technical Details

SBM ModScript version: 11.3.

Example

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

Or:

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

Notes

None.

Related Topics

AppDb