Table Adapters ADO 2.0

Discussion in 'Microsoft VB .NET' started by Microsoft Newsserver, Jun 23, 2008.

  1. I am using a table in SQL which has a Date field which allows Nulls. I have
    created a table adapter in order to manipulate this table. So far so good.

    This field is 'RequiredByDate'.

    If I create an Insert method in my table adapter and pass the function a
    null, when I run that function, it fails and tells me that

    throw new global::System.Data.StrongTypingException("The value for column
    \'RequiredByDate\' in table \'tblIssue\' is DBNull.", e);

    There is a member function which allows you to set the RequriedByDate's
    column's base type to DBNull, but this seems to conflict with the property
    for this column,

    In Short. How do I set a value to Null using a table adapter function
    without generating these exceptions. ?
    Microsoft Newsserver, Jun 23, 2008
    1. Advertisements

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.

Share This Page