DetailsView ObjectDataSource and strongly typed dataset

S

Spotnick

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top