1

I am using a MySqlDataReader and a Sqlite.SqliteDatareader.

For both, I can access the value of a column like this:

    Do While r.Read
        dim sSomeString = r("SomeColumn")
    (...)

I think that r("SomeColumn") internally resolves to a specific function / property, for example r.Columns("SomeColumn").Value, but I did not find a property that would fit.

Can somebody tell me what this function / property is?

I hope somebody understands my question.

tmighty
  • 10,734
  • 21
  • 104
  • 218
  • What are you actually trying to do? an object can have an indexer which is accessed like this and there is no need for it to have any other method or property backing it (though it may do). – Chris May 22 '14 at 21:03
  • I would like to be sure I am interpreting the column type correctly. – tmighty May 22 '14 at 21:04

1 Answers1

1

It maps to the Item property:

Gets the value of a column in its native format.

so

Dim sSomeString As String = r("SomeColumn").ToString

is equivalent to

Dim sSomeString As String = r.Item("SomeColumn").ToString
LarsTech
  • 80,625
  • 14
  • 153
  • 225