Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DetailsView ObjectDataSource and strongly typed dataset

Reply
Thread Tools

DetailsView ObjectDataSource and strongly typed dataset

 
 
Spotnick
Guest
Posts: n/a
 
      01-21-2006
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
accessing strongly typed properties of a Datatable when binding through the ObjectDataSource and Container.DataItem John Davis ASP .Net 0 08-31-2006 11:56 AM
accessing strongly typed properties of a datatable when binding through the objectdatasource and Container.DataItem John Davis ASP .Net 0 08-30-2006 08:28 AM
Custom Namespace For Strongly Typed DataSet Narayanan Sankaranarayanan ASP .Net 0 12-15-2004 01:28 AM
Help with creating strongly typed DataSet =?Utf-8?B?QW5kcmUgUmFuaWVyaQ==?= ASP .Net 1 04-19-2004 12:42 AM
Strongly Typed dataset Imran ASP .Net 1 01-23-2004 07:42 AM



Advertisments