DataReader into object..

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi to all.

I have a DataReader that its associated with a connection.

My query has results, and i have a class with the same fields name than the
table in the database...

I would like to know what its the best way to fill the properties of my
object with a datareader.

Thanks.
 
Hi Josema,

Do you want to fill the properties that represent field names
by DataReader?
To accomplish that you can cast your DataReader to IDataRecord
and then iterate through all field names.

If my answer is out of your problem then i think that you should
be more precise with your problem.

Regards!

Marcin
 
Back
Top