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?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
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:
    333
    Chris Dunaway
    Dec 23, 2003
  2. Suzanne
    Replies:
    3
    Views:
    197
    Miha Markic [MVP C#]
    Jan 28, 2004
  3. Maniaque

    Multiply network adapters

    Maniaque, Jan 29, 2004, in forum: Microsoft VB .NET
    Replies:
    3
    Views:
    209
    Herfried K. Wagner [MVP]
    Jan 29, 2004
  4. afsheen
    Replies:
    1
    Views:
    344
  5. afsheen
    Replies:
    1
    Views:
    483
  6. Guest

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

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

    Table adapters vs. Data adapters

    Chas, May 22, 2007, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    504
    Cor Ligthert [MVP]
    May 23, 2007
  8. Scott M.

    Re: ADO.NET vs ADO

    Scott M., Oct 20, 2008, in forum: Microsoft VB .NET
    Replies:
    3
    Views:
    388
    Michel Posseth [MCP]
    Oct 21, 2008
Loading...