Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NULL fields - confused 1

Status
Not open for further replies.

ad2

Technical User
Dec 31, 2002
186
US
Ok, as I understand it, these are fields that one doesn't know if a value exists, as apposed to just empty. That is you don't know if a cutomer has a cell phone.

How does one express this in the database field itself. Do you actually put in the text NULL? Then if the field is left empty, the meaning is that the customer does not have a cell phone?

And what is the difference between this and "allow empty string field"?
 
Most users would be confused if they saw "NULL" in the phone field. Just leave the field blank, i.e. the way Access would do it if it's a bound control. Whether a field is Null or not is a problem for us programmers to handle, don't bother the users with the gritty details.

"Empty String" is a string field with no characters, literally it is "". You could look at it as meaning "we know there's no value for this", whereas as Null means "we don't know if there's a value for this or not". For example, a field such as Cell Phone #, perhaps you know for sure the customer doesn't have a cell phone, or perhaps you have no idea if they have a cell phone.

We sometimes set "Allow Empty String" to false in the case of a required string field. If we don't do this, the user could enter an empty string, which is really the same as not entering a value at all.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top