Search code examples
delphioxygene

How access datarow value using Oxygene


The following line of code generates the compile time error (PE19) There is no overloaded method "get_item" with 0 parameters. Any idea on how to access the data in the datarow using Oxygene?

indexValue:=dtIndexValues.Rows[1].Item('IndexID');

Solution

  • indexValue := dtIndexValues.Rows[1].Item['IndexID'];
    

    or

    indexValue := dtIndexValues.Rows[1]['IndexID'];
    

    since Item is the default indexer.