p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ADO.NET (http://p2p.wrox.com/forumdisplay.php?f=109)
-   -   Getting Bit value from datareader. (http://p2p.wrox.com/showthread.php?t=1547)

DittoToo July 11th, 2003 10:27 AM

Getting Bit value from datareader.
 
I have this function:

Code:

Public Function CheckNullReturnBolean(ByRef oRead as SqlDataReader, ByVal i as Short) as Boolean

    If oRead.IsDBNull(i) then
        Return vbNull
    Else
        Return oRead.GetDataType(i)
    End If

End Function

The value in the reader is a bit field. What Get data reader method would I use to pull out this value?

Thanks,

Jerry

sinceresiva May 25th, 2006 11:19 AM

You can use the following syntax,

dreaderResults.GetValue(dreaderResults.GetOrdinal( "bitDepositsAllowed"))

Thanks,

Siva



All times are GMT -4. The time now is 08:12 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.