[RESOLVED] [2005] Retrieving TinyInt values using the SQLDataReader
Edited:
Sorry, needed more help than initially thought... please check this link: http://vbforums.com/showthread.php?t=486068
How do I retrieve tinyint values through the SqlDataReader?
I've tried the GetInt32 method, but obviously this requires some kind of casting to be performed?
Any help would be greatly appreciated.
Thanks.
Re: [2005] Retrieving TinyInt values using the SQLDataReader
As the documentation for the SqlDbType enumeration says, this is how SQL Server integer types map to .NET types:
BigInt = Int64 (Long)
Int = Int32 (Integer)
SmallInt = Int16 (Short)
TinyInt = Byte
Therefore to get a TinyInt value you'd call GetByte.
Re: [2005] Retrieving TinyInt values using the SQLDataReader
Thanks jmcilhinney.
Very useful cross reference.