title: SqlDataReader Reading a bit datatype from SQL Server 2008?
body: <p>I am using SQL Server 2008 in a asp.net/c# program.  I am trying to use SqlDataReader to fetch the data form the db, but I'm not sure what to use for the datatype "bit".</p>
  
  <pre><code>//these are the assemblies i added manually
  using System.Web.Script.Services;
  using System.Data;
  using System.Data.SqlClient;
  using System.Configuration;
  
  SqlConnection conn2 = new SqlConnection(ConfigurationManager.ConnectionStrings["ucsConnectionString"].ConnectionString);
  SqlDataReader rdr2 = null;
  conn2.Open();
  
  SqlCommand cmder = new SqlCommand("usp_Device_GetBy_DeviceID", conn2);
  cmder.Parameters.AddWithValue("@ID", id);
  cmder.CommandType = CommandType.StoredProcedure;
  rdr2 = cmder.ExecuteReader();
  rdr2.Read();
  
  *insert datatype &amp; var* = rdr2.GetSqlBit(rdr2.GetOrdinal("Line_Name"));
  </code></pre>
  
  <p>I found a couple sites that referenced the above "GetSqlBit" but apparently it is not part of the assemblies I'm using.  Any suggestions how I can read this "bit" datatype from SQL?</p>
  
  <p>I found a similar datatype using "GetSqlBinary" but I don't fully understand how it works or if it would be appropriate for this situation?</p>
  
  <p>Everyone's ongoing help is appreciated!</p>