473,566 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Allow Zero Length.. yes or no?!

374 Contributor
I have just been looking through a few websites and found massive debates around Allow Zero Length strings within a field.

I have read that having the property set to yes can make your queries run a bit slower as they are having to check for nulls and ZLS.

With this being said, when should I be selecting yes and when should I be selecting no?

My database will be for data entry and analysis. I have a number of text fields, 4 memo fields and ofcourse a few number fields within my tables. Should I be setting the ZLS property to no for all my text/memo fields within my database? Is this standard practice?

I am using access 2003.

Thanks,

Chris
Aug 6 '10 #1
1 8760
NeoPa
32,564 Recognized Expert Moderator MVP
Allowing ZLSs should be dependent on the applicability of ZLSs only. Let me explain some of the background.

Nulls are used in Access to represent the absence of a value. If you want the value to be optional you set it to Nullable (Required = No). If, on the other hand, you want to reflect a value of en empty string, then set ZLSs to allowed (Allow Zero Length = Yes).

The main thing to remember is that Nulls and ZLSs are entirely different animals and both have their reasons for being.

Frankly, it's hard to think of a real-life scenario where ZLSs would be needed, but say you had a questionnaire sent out to all the attendees of a course. There is an [Attendee] table with fields for the people attending, but also with fields for the answers to each of the questions on the form, including one for the almost mandatory "Please add any further comments you may have about this course".

Some attendees will not return the questionnaire at all. Many will tick most of the boxes, but only one or two will enter any comments. Assuming this data is entered from the printed forms into a form on the database for questionnaire results. Each entry would reflect a returned form. The value for the last field would be a ZLS for those who returned the form, but chose not to add any comments. When these records are used to update the [Attendee] table, those who returned questionnaires with comments would be updated with their comments. Those who returned questionnaires but without comments would be updated too. Only those who failed even to return their questionnaires would still have the default of Null representing their comments, thus indicating the difference between the two.
Aug 6 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
7144
by: William Kossack | last post by:
We ran into a problem loading access where tables where if we did not select the property allow zero length we got an error message when loading data with some empty values. We are now ramping up SQL server and the question came up will SQL server have the same problem with empty data values. Is there an SQL server equivalent to allow...
3
3035
by: shreedhar | last post by:
If I try to delete a record from my table which is giving following error Warning: PostgreSQL query failed: ERROR: pg_atoi: zero-length string in /xxx/database.inc on line 73 What might be the problem. Regards, Sreedhar Bhaskararaju
6
2596
by: Rob Fielding | last post by:
Hi, We're currently experiencing a problem where SQL statements are failing when entring a '' for not not-null integer columns: ERROR: pg_atoi: zero-length string This was discovered just after a database migration from 7.2 to 7.3.4. Example:
2
5093
by: William Kossack | last post by:
How do you set the "Allow Zero Length" option for an access field during an sql create query?
31
4975
by: RS | last post by:
Hi, Looking to see if the following construct is valid: typedef struct { int foo; char bar; } foobar; Basically, the idea is to have the structure above point to a message buffer that has a 4-byte integer followed by a stream of variable
4
2468
by: Randall Parker | last post by:
I am designing a database schema. It happens to be in MySQL but I'm trying to keep it portable to other databases should the project grow. Anyway, suppose you have VARCHAR fields and will be using ASP.Net and ADO.Net. In your experience does it make more sense to allow NULL values for VARCHAR fields or will they behave well and get set to...
2
5897
by: johnb41 | last post by:
I have a simple form that has a bunch of textboxes that show data from a dataset table. When I "Add" a record with BindingManagerBase.AddNew(), all the textboxes go blank, so I can add a new record. If I leave a field totally blank, and then click the Update button (which uses the DataAdapter.Update() command, I get an error saying: ...
10
4566
by: Lyle Fairfield | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaac11/html/acfctNZ_HV05186465.asp "If the value of the variant argument is Null, the Nz function returns the number zero or a zero-length string (always returns a zero-length string when used in a query expression)" **** How many records are there in FirstTable in which...
7
3559
tdw
by: tdw | last post by:
Hi all, I've tried to find this answer in the help menu and online but haven't found it: When I type in a field on my form, and then hit backspace to erase what I just typed, my understanding is that the field is now considered zero length, and not null. I have a field on the form that looks up info in another table based on what was just...
11
3875
by: MC | last post by:
I have a couple of customers who are using a program that deserializes an XML file, and on some files, the program fails to see the content of the file -- treats it as zero length and reports "root element is missing" -- even though in Notepad the file looks normal. Has anybody ever seen this? Any clues? I have not been able to reproduce...
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8108
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.