Dear all, I have a req in a case where two tables are lined in which the foreign key is an int. and the foreign key is not mandaory. So i want to make the value of int as null. I also tried with Integer class. Can u throw some light on this.
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
rubbery bacon. crispy tiny ad:
a bit of art, as a gift, that will fit in a stocking