Data type conversion

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Thomas Beyerlein

    Data type conversion

    Hi,
    I need help with a Error message. It is do to a datatype conversion of a
    varchar to a float. If anyone has code to convert or an away around this
    problem that would be great.

    Thanks for all the help.

    Tom


    *** Sent via Developersdex http://www.developersdex.com ***
  • Robin Tucker

    #2
    Re: Data type conversion

    float? You mean single or double?

    a varchar returned from SQL Server is usually accessed as a "string".

    If this be the case, then Single.Parse or Double.Parse will do. However,
    it's better to use TryParse, just in case the number is badly formed.

    "Thomas Beyerlein" <tbxml@yahoo.co m> wrote in message
    news:OoqkidDbFH A.3196@TK2MSFTN GP14.phx.gbl...[color=blue]
    > Hi,
    > I need help with a Error message. It is do to a datatype conversion of a
    > varchar to a float. If anyone has code to convert or an away around this
    > problem that would be great.
    >
    > Thanks for all the help.
    >
    > Tom
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***[/color]


    Comment

    Working...