Are we talking database-tabels here?
Is it a insert or read you are trying to do?
The easiest way to get a null, is creating an sql-query, and just omitting the value that should be null, or setting it to null. That should be no problem as the sql-queries are strings.
As for representation in the program, I usually try to know the limit of the value used. Since it's a foreign key, it's linked to a primary key of some othar table. These keys usually start at 0 or 1, so by using a nullValue-operator on the select, you can convert the null value to a negative, fixed value, representing null inside your app.
/Mike