Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 11th, 2003, 10:27 AM
Registered User
 
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
 
Old May 25th, 2006, 11:19 AM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can use the following syntax,

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

Thanks,

Siva






Similar Threads
Thread Thread Starter Forum Replies Last Post
64 bit p0120144 BOOK: Professional Assembly Language 1 December 26th, 2006 10:04 PM
64 Bit - Issue in 64 bit IIS calling Win32 API Hubman General .NET 1 August 24th, 2006 09:19 AM
A bit concerned JoanW BOOK: Accessible XHTML and CSS Web Sites: Problem Design Solution 1 April 24th, 2006 08:24 AM
bit error! sxbluebird BOOK: Professional C#, 2nd and 3rd Editions 0 February 10th, 2004 06:03 AM
A Bit Of A Problem Ben Horne Excel VBA 1 December 12th, 2003 12:55 AM





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