What's the best way to handle the following situation. (I can use NULL or Not Null, as long as I get it working).
I have a note table with a field called NoteContact (Int). It's a FK to my contacts table. I do not have to specify a contact for my note.
I have a combobox on my form bound to my NoteContact field. I populate using the population data source settings. I display the contact name on the dropdown and my value member is the contact PK. I should mention that my combobox type is a dropdown. I need to be able to clear the value (I guess a zero or NULL value) or enter a contact that currently doesn't exist in the list. (I have logic to automatically create a new contact).
Thanks,
Tim
I have a field in my notes table called ContactFK. (Integer,Nullable). It's a foreign key to my contacts table. The contact is optional on a note. I set the NULL value option in the BO Mapper to 'Use Nullable Generic'.
When I set my field to nothing I get an error 'Specified Cast is not valid' on the following line of code:
Is there something wrong with this setup? I used Nullable generic a while back for a System.Double and it worked fine.
Thanks
TIm