Accessing field values by fieldname using OracleDataReader?

Accessing field values by fieldname using OracleDataReader?

Postby rakgol_a » Wed 03 Sep 2008 14:35

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.
rakgol_a
 
Posts: 13
Joined: Wed 17 Oct 2007 13:10

Postby Shalex » Fri 05 Sep 2008 07:31

Code: Select all
x = reader.GetString(reader.GetOrdinal("Field1"));
Shalex
Devart Team
 
Posts: 7149
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle