liquidspaces
Well-known member
I have a form that has maybe 50 fields. The user can search for specific data, though not all of the data is required in the database. Because of that, there will be some null values in some of the fields. If I dont check for DBNULL, the program crashes when I try to place the value of a null field in a textbox. I can go ahead and check for DBNULL for every field in the database, but that takes so much time in "if...else" statements. Is there a way where I can write generic code to apply to all the fields? Something like:
If any field isdbnull then
appropriate textbox = ""
else
textbox = value
???
If any field isdbnull then
appropriate textbox = ""
else
textbox = value
???