SQLColumnDef

Description

Provides information about a single column. See also AppDB.ReadDynaSQL.

Inheritance

SQLColumnDef does not inherit from any object type.

Constructors

Properties

Property Type Description

int

dbType

Must have a value from DBTypeConstants, used to identify the type of column in the db that is bound to.

string

name

Used for database column binding.

SQLColumnDefOutputHint

outputHint

Used to help determine what type of object to return for the column. See SQLColumnDefOutputHint.

Example

var out = []; // creates an empty Vector

Shell.Db().ReadDynaSQL(
  "select TS_ID,TS_NAME,TS_LASTLOGINDATE from TS_USERS where TS_STATUS=? order by TS_NAME",
  [
    SQLColumnDef(DBTypeConstants.INTEGER,"TS_ID"),
    SQLColumnDef(DBTypeConstants.VARCHAR,"TS_NAME"),
    SQLColumnDef(DBTypeConstants.BIGINT,"TS_LASTLOGINDATE", SQLColumnDefOutputHint.TimeT)
  ], out, [Pair( DBTypeConstants.INTEGER, 0)] );

for ( row : out ){
  Ext.WriteStream( "${row[0]}\t${row[1]}\t${row[2].date}" );
}

Related Topics

Object Types

Working with Application Objects