If not, just typecast it to null when you encounter one. If it is valid you can still do that, by wrapping it in a conditional that checks the foreign row exists first.
In general it's not a good idea to allow FKs to be null. Some databases (I know oracle does this) enforce this by tying FKs to primary keys rather than columns in other tables. Could you refactor your tables not to need nulls for that column?
Unfortunately no because they're not tables created by us so we need to work with what we have. – jumbojs Jan 18 '09 at 4:06 "we need to work with what we have"... yes, that's the sad story of our lives. :-) – Mark Harrison Jan 19 '09 at 2:23.
Because it's a template I'm working on, I want every field in the table, including nulls. I was helped on how to update nulls by adding (object)this. Value but I have a field that's a foreign key and even though when I look in the database it says null, when I pull the records the value becomes 0.
When I try to update this field it says that I am violating foreign key constraints. How can I work around this problem? I thought the null solution would work but it doesn't show as null, it shows as 0.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.