Link to home
Start Free TrialLog in
Avatar of allelopath
allelopath

asked on

SqlDataReader Class constructor

What is happening in the 3rd line of code here:
MyReader = command3.ExecuteReader(CommandBehavior.CloseConnection)
If MyReader.Read Then
     FromAddress = MyReader("Email")

Open in new window

It looks like it is calling a constructor of MyReader but I see nothing in the documentation like that.
ASKER CERTIFIED SOLUTION
Avatar of John (Yiannis) Toutountzoglou
John (Yiannis) Toutountzoglou
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of allelopath
allelopath

ASKER

You're right, that's seems to be how it works, but I don't see anything in the documentation saying that MyReader("x") is the same as MyReader.Item("x").
If you try i(I've tried it) to write the command and open a "(" you will see the syntax...


John (Yiannis)
SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial