>> DataRelation and Nulls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I have two table (Business and Contacts) for which I would like to
create a DataRelation. The problem is that the Foreign key field cannot be
null. So the code throws an exception when trying to create the DataRelation.

My database does not have any records; business or contacts. How do I create
a data relation when the data does not yet exist? Then what if I want to add
a business record and don't have a contact?
 
I think you problem may lie in the fact that your Foreign Key may be setup
as a nullable field and this is basically saying you can't do that. Modify
your table with the Foreign Key column and set it not to allow nulls.
 
Thanks friend, in checking whether the foreign key field did allow nulls I
found that <face color=red> the actual problem was a spelling mistake! </face>

--
Many thanks
Jonathan Parminter


+Vice said:
I think you problem may lie in the fact that your Foreign Key may be setup
as a nullable field and this is basically saying you can't do that. Modify
your table with the Foreign Key column and set it not to allow nulls.
 

Ask a Question

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. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top