Skip to main content
Version: 11.2

Cols.ds()

note

This article is about the ds() function of the Cols object.

Cols.ds()

Gets the data source that the first column in scope belongs to.

Returns a UdbDsc object.

Syntax

$.udb( *ds* ).cols( [columns] ).ds()
$.udb( *ds* ).rows( [rowRef1], [rowRef2] ).cols( [columns] ).ds()
$.udb( *ds* ).rowSet( *rowSet* ).rows( [rowRef1], [rowRef2] ).cols( [columns] ).ds()

The required ds parameter is a data source selector.

The optional rowSet parameter is a rowset identifier. If the .rowSet() clause is omitted, then .rowSet('current') is assumed.

The optional rowRef1, rowRef2 are row selectors. If omitted, only the column meta data can be accessed.

The optional columns is a column selector. If omitted, all columns in scope are selected.

Example

let cols = $.udb('EMP').cols('EMPNO');

console.log('This column belongs to %s', cols.ds().name());