How to treat in C # data coming from a table that is of type bit in sql server?

Posted on

Question :

In Visual Studio it will look like this:

alerta.DataHoraCadastro = dr.Get(12);

How do I do this?

    

Answer :

In case you will have to convert the information to boolean.
It would look like this:

alerta.DataHoraCadastro = dr.GetBoolean(12);

    

Leave a Reply

Your email address will not be published. Required fields are marked *