codegen:nullValue, Using Annotations with a Typed DataSet, Not resolved never!

  • Thread starter Thread starter Efy.
  • Start date Start date
E

Efy.

Hello,

The following problam description I did not need to write, I just
copied from the groups from others which met the error and allways the
thread was 1 artical the problem was never resolved!
So, please someone there , any idea?

I've createed a typed dataset that I fill from a sql query.
The problem comes when I try to access the elements after it's filled
if I
have any null dates (which there should be some), it bombs, I can't
even use
IsDBNull() without throwing an error.

I tried using codegen:nullValue="_null" but it won't compile.

How do you handle null dates in a typed dataset ?

I am using a typed dataset and want to allow some columns
to support nulls. I understand that you can specify this
behavior via schema annotations. I have added
the 'codegen' namespace declaration, but when I add the
codegen:nullValue="_null" annotation to a column, I get an
error:

Custom tool 'MSDataSetGenerator' failed. System error.

There is no other information available. Can anyone help
me out on this?

Thanks.
Help
Efy.
 
Efy,

If you go back and read the documentation concerning the use of
codegen:nullValue="_null", you'll see that it specifies that an exception
will be raised if a primitive type is encountered. Both dateTime and date
are primitive types, so there's your problem. If this element permits
nulls, I'd recommend you set it to nullable in the schema and omit the
codegen:nullValue attribute entirely.

HTH,
Nicole
 
Back
Top