If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > System.DbNull.Value vs. Empty ("") and more...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-19-04, 15:34
freekMEDIA freekMEDIA is offline
Registered User
 
Join Date: Jan 2004
Location: Florida
Posts: 25
Smile System.DbNull.Value vs. Empty ("") and more...

Hey,
This might be a dumb question, but I couldn't find much on it that really explained it very well. Maybe someone here can help me.
I would like to know a couple of things, firstly is whether it is better to have a NULL value, or a "" in a database field that MIGHT not contain a value.
As an example, when a user signs up on my site, eventually when I get it up and running fully (http://www.okcguide.com), for fields that are not required (like an address, or phone number field), should I check for an empty HTML form field, and if it is empty, place a NULL into the database, or should I place a ""? I would assume NULL, but I'm going for best practice here

Also, one more question, and I realize this is an Access specific question, but maybe someone can answer both at the same time. When I choose Required = No for my field I know that means no NULLs, does the Allow Zero Length mean no zero-length strings ("")? So in other words, it's either a value, or NULL? (if I allow NULL)

Hmm, maybe someone can help.
Thanks so much!!
__________________
--

Travis Nelson
http://www.travis-nelson.com/
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On