Results 1 to 3 of 3

Thread: [RESOLVED] Data type error.

  1. #1

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Resolved [RESOLVED] Data type error.

    Hi I am getting this error
    Input string was not in correct format
    when trying to assign a value from a datarow column, any ideas anyone?
    VB Code:
    1. Dim CarriageType As Integer = CInt(dr.Item("CarriageType"))

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Data type error.

    is carriagetype infact a numeric value? make sure you aren't reading a null field or something

    or try

    Dim CarriageType As Integer = CInt(dr.Item("CarriageType").ToString)

  3. #3

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: [RESOLVED] Data type error.

    Yes I was getting the wrong field, Carriage type is a description I meant to get CarriageTypeID

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width