Page 1 of 1

Accessing field values by fieldname using OracleDataReader?

Posted: Wed 03 Sep 2008 14:35
by rakgol_a
Hi,
Is there a way of accessing field values when iterating through OracleDataReader result without referencing fields by their
index instead to use fieldname.

Delphi has
x := dataset1.FieldByName('Field1').AsString;

What's the equivalent?

Regards.

Posted: Fri 05 Sep 2008 07:31
by Shalex

Code: Select all

x = reader.GetString(reader.GetOrdinal("Field1"));