J
Jacob F.
Hello all,
I'm working on an application that uses a DbDataReader to retrieve
information from a SQL Server 2005 column, then put that data into object
variables. My code looks like this:
value = (int)dbReader["value"]
For column types of int, this works fine. However, for tinyint or smallint,
I get an invalid cast error.
Is there a way to make this work?
Thanks,
Jacob
I'm working on an application that uses a DbDataReader to retrieve
information from a SQL Server 2005 column, then put that data into object
variables. My code looks like this:
value = (int)dbReader["value"]
For column types of int, this works fine. However, for tinyint or smallint,
I get an invalid cast error.
Is there a way to make this work?
Thanks,
Jacob