Solved

Can't have empty fields to update records?

Posted on 2001-08-03
3
169 Views
Last Modified: 2012-08-14
This question is a continuation to these two topics:

http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=asp&qid=20162452

and

http://www.experts-exchange.com/jsp/qManageQuestion.jsp?qid=20161841

and

http://www.experts-exchange.com/jsp/qManageQuestion.jsp?qid=20162639

If I leave some fields blank it gives this error message:

Microsoft JET Database Engine error '80004005'

Field 'students.AptNumber' cannot be a zero-length string

The same applies to all fields.
How do I fix that?



0
Comment
Question by:amira123
3 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 50 total points
ID: 6350353
look at the field definition in the database.  ensure that the AllowZeroLength property is set to 'Yes'.
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6350393
Or validate the field prior to the update if you can't mod the dB, and insert a " ", or a "vbCr" in the field, anything that the field recognizes as notNull.
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6350800
AzraSound is correct. Though your that field may indicate that null values is accepted, you do also need to set "AllowZeroLength" to yes/true.

hongjun
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Update field in order 21 142
Hide row when retrieving data from database 6 61
Change visitor's REMOTE_ADDR to server's REMOTE_ADDR 2 30
alert(innerHTML); 8 18
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question