D
Dom
Still teaching myself about SQLDataReader and associated classes. I
have to say, the new HELP screens from MS are just about useless!!
Let's assume I have just read some records from a table into the
SQLDataReader object, r.
1. Am I right to assume that accessing the fields as r[int] is a
little faster than r[name]?
2. The elements of r are all objects. I can changes these to the
appropriate objects by upcasting, (string) r[0], or (DateTime) r[0],
etc. But how do I get a field that is an integer, or a float?
3. This isn't really about SQLDataReader, but it came up at the same
time. How do I get the number of days between 2 dates. I tried
((DateTime) r[0]).Subtract ((DateTime) r[1]), but it didn't work.
Thanks,
Dom
have to say, the new HELP screens from MS are just about useless!!
Let's assume I have just read some records from a table into the
SQLDataReader object, r.
1. Am I right to assume that accessing the fields as r[int] is a
little faster than r[name]?
2. The elements of r are all objects. I can changes these to the
appropriate objects by upcasting, (string) r[0], or (DateTime) r[0],
etc. But how do I get a field that is an integer, or a float?
3. This isn't really about SQLDataReader, but it came up at the same
time. How do I get the number of days between 2 dates. I tried
((DateTime) r[0]).Subtract ((DateTime) r[1]), but it didn't work.
Thanks,
Dom