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
    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.
Similar Threads
  1. Rich

    Can SqlSrv2k use ADO and ADO.net from VB?

    Rich, Dec 22, 2003, in forum: Microsoft VB .NET
    Replies:
    6
    Views:
    163
    Chris Dunaway
    Dec 23, 2003
  2. afsheen
    Replies:
    1
    Views:
    205
  3. afsheen
    Replies:
    1
    Views:
    310
  4. Guest

    Non-GUI use of table adapters / data tables...

    Guest, Oct 11, 2005, in forum: Microsoft VB .NET
    Replies:
    2
    Views:
    155
    Cor Ligthert [MVP]
    Oct 11, 2005
  5. Chas

    Table adapters vs. Data adapters

    Chas, May 22, 2007, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    393
    Cor Ligthert [MVP]
    May 23, 2007
Loading...

Share This Page