CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    12

    Trouble with NULLS,foreign keys, combos. Any great guru can help me?

    The trouble is the following:

    I have a SQLServer table. One of the fields corresponds with a foreign key value. But it may
    be a null value.I mean, it may be a null value, but if it is not, it may correspond with one of the values of the foreign key
    I have a DataCombo bound to this field. If I don´t edit the field, nothing happens when I update. A null value is correctly stored.
    But if the user edits the value and decides he
    wants to cancel edit (Backspace, or blanks " ")
    when I update SQLSErver says "" or " " is not a
    correct foreign key!!!
    I tried, before updating the value (WillMove event), to set a NULL
    value if the value is a blank. But sometimes i don´t have the control of every update - i have
    Grids and other bound objects-
    Otherwise, i cannot store a NULL value in a combobox.
    Is there any way to do this, any option in Database design that doesn´t make me control it
    using Database triggers?

    Thanks in advance
    JaIme



  2. #2
    Join Date
    May 1999
    Posts
    13

    Re: Trouble with NULLS,foreign keys, combos. Any great guru can help me?

    Jaime:

    Thanks for your help on the VB6 data report question--it worked!

    John


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured