Nullable DateTimes in TypedViews

Posts   
 
    
Wiggy
User
Posts: 5
Joined: 27-Jan-2009
# Posted on: 14-Jul-2009 10:13:46   

Hi All,

I've just noticed something with DateTime values and database views.

When a nullable DateTime field is defined by LLBLgen through a TypedView only the field type of DateTime is specified. Obviously this is because LLBLGen has no knowledge of the underlying table nor data so can't determine this... Is there a work around?...

ie. Is it possible to defined nullable DateTime fields in TypedViews?

Because at the moment any bound grid fields to the date time values are displaying 01/01/0001 instead of null?

Any help or advice would be appreciated

thanks,

Andrew

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 14-Jul-2009 10:27:40   

The following thread explains all about view and nullable fields: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=15055

Wiggy
User
Posts: 5
Joined: 27-Jan-2009
# Posted on: 21-Jul-2009 11:17:13   

Walaa wrote:

The following thread explains all about view and nullable fields: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=15055

Sorry I can't follow this link. If I click on it I simply get redirected to a default Url

http://www.llblgen.com/TinyForum/default.aspx??confused

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 21-Jul-2009 16:25:33   

Sorry, that's actually a private helpdesk thread. The main point of it is summarized below.

"It doesn't read isnullable from view meta-data because often databases don't update this info after the view has been created. So if you for example create a view from table T and 2 fields are not nullable, and after creation of the view, you alter the field in the table, the view's meta-data isn't updated. This isn't true for all databases, but for some it is the case, hence this value is ignored. "

Most grids have a "null value" which you can set to get it show a blank/null for a particular value.

Matt