Table Adapters with Non Nullable Fields.

Discussion in 'ASP .Net' started by Microsoft Newsserver, Jun 18, 2008.

  1. OK this is kind of an anomaly here.


    I have a table with a Primary Key which of course is non nullable. However,
    I want to generate a query in my table adapter which makes use of the ID
    Parameter using the where clause.

    Where ID=@ID or @ID IS NULL

    So, the signature generated by the designer ( 2005/2.0 ) is
    functionname( System.int32 )

    In order to allow me to select a specific row, or all rows. I have to select
    the query in the table adapter and tell the parameter that it is nullable.
    So far so good.

    Only issue is everytime I modify that query, it puts the parameters back to
    non nullable, giving me my original problem. Is there a way of preventing
    the designer from doing this, and is this addressed in 3.0 ?

    Cheers
    Microsoft Newsserver, Jun 18, 2008
    #1
    1. Advertising

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. Bennett Haselton
    Replies:
    0
    Views:
    283
    Bennett Haselton
    Oct 21, 2004
  2. Jacques Wentworth

    Property 'Keycode' is non-nullable

    Jacques Wentworth, Mar 11, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    3,587
    Jacques Wentworth
    Mar 11, 2005
  3. darrel
    Replies:
    0
    Views:
    382
    darrel
    Jan 30, 2007
  4. Replies:
    0
    Views:
    423
  5. Harlan Messinger

    Help with GridView empty fields and non-nullable columns

    Harlan Messinger, Apr 12, 2009, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    1,329
    Harlan Messinger
    Apr 12, 2009
Loading...

Share This Page