DetailsView ObjectDataSource and strongly typed dataset

Discussion in 'ASP .Net' started by Spotnick, Jan 21, 2006.

  1. Spotnick

    Spotnick Guest

    When I found out about the detailsview control, I thought it would save me a
    lot of time when doing basic table updates.

    All my business logic layer uses strongly-typed datasets, and I did plug a
    detailsview using an objectdatasource, seems to work fine, until the
    database returned a DBNull.

    The error I got is:

    Property accessor 'WebsiteUrl' on object 'ArtistDataSet+ArtistRow' threw the
    following exception:'The value for column 'WebsiteUrl' in table 'Artist' is
    DBNull.'

    Of course what is the error is a cast error between System.String and DBNull

    But seriously? Aren't there any way at all to avoid this error? Otherwise I
    can't use detailsview or formview at all.

    Thank you.
    Spotnick, Jan 21, 2006
    #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. Narayanan Sankaranarayanan

    Custom Namespace For Strongly Typed DataSet

    Narayanan Sankaranarayanan, Dec 15, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,079
    Narayanan Sankaranarayanan
    Dec 15, 2004
  2. Imran

    Strongly Typed dataset

    Imran, Jan 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    564
    Richard A. Lowe
    Jan 23, 2004
  3. =?Utf-8?B?QW5kcmUgUmFuaWVyaQ==?=

    Help with creating strongly typed DataSet

    =?Utf-8?B?QW5kcmUgUmFuaWVyaQ==?=, Apr 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    505
    Rick Strahl [MVP]
    Apr 19, 2004
  4. John Davis
    Replies:
    0
    Views:
    396
    John Davis
    Aug 30, 2006
  5. John Davis
    Replies:
    0
    Views:
    523
    John Davis
    Aug 31, 2006
Loading...

Share This Page