Posted on 2004-10-13
In Delphi, you use dataset to run a query, like select * from atable.
then you can use dataset.fieldbyname('AFieldName').asString (or as DateTime etc.) to get the field's value.
But I find in C#, you can only use fields' index to get the value rather than using field's name. So if you change your select fields order or insert a new field in the select, you have to chnage a lot of statements.
Is there a way use field's name like Delphi in C#?