Re: Convert DataRow content to bool

Discussion in 'ASP .Net' started by Ignacio Machin, Jul 7, 2003.

  1. Hi

    Have you tried (bool)dr["field"] ?

    If field is of type bool it should be ok.

    Hope this help,

    --
    Ignacio Machin,
    ignacio.machin AT dot.state.fl.us
    Florida Department Of Transportation

    "Beza" <> wrote in message
    news:...
    > How do I convert a value stored in a DataRow to bool data type?
    >
    > I've tried dr["field"].ToBoolean() but it says "object does not contain a
    > definition for ToBoolean.
    >
    > Any ideas?
    >
    >
     
    Ignacio Machin, Jul 7, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eliyahu Goldin

    Re: Convert DataRow content to bool

    Eliyahu Goldin, Jul 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    358
    Eliyahu Goldin
    Jul 7, 2003
  2. Paul W
    Replies:
    1
    Views:
    1,322
    Bryant Hankins
    Aug 6, 2004
  3. Patrick Olurotimi Ige

    Cannot implicitly convert type 'object' to 'bool' Error

    Patrick Olurotimi Ige, Jan 25, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    12,214
    Patrick Olurotimi Ige
    Jan 25, 2005
  4. Paulo
    Replies:
    2
    Views:
    5,799
  5. Julius Fenata

    Convert bool to SqlBoolean

    Julius Fenata, Mar 15, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    165
    Michael Tkachev
    Mar 24, 2005
Loading...

Share This Page