Sunday, October 21, 2007

Access Error: XXX DB can't append all the records in the append query

Currently I am working on a small project using MS Access Database. Since I am not so expert with the MS Access, it really brings me a lot of problems and spent me a lot of time too.

I tried to insert a new record into my database, but it kept came up with the message below

XX DB can't append all the records in the append query.

XX DB set 0 field(s) to Null due to a type conversion failure, and it didn't add 0 record(s) to the table due to key violations, 0 record(s) due to lock violations, and 1 record(s) due to validation rule violations.
Do you want to run the action query anyway?
To ignore the error(s) and run the query, click Yes.
For an explanation of the causes of the violations, click Help.


I tried to search online for the solution, but i can't find one. i tried to use .Execute method hope that it may give me a more meaningful error message. Finally i figured out what is the cause.

This error may happen if the field is Required, but no value is supplied.

It also can happen if the field's Allow Zero Length property is set to No, but you attempt to add a zero-length string instead of a Null. And there is a Validation Rule for the table (in the Properties box in the table design), as well as for the fields.

Hope this can help you.

0 comments:

 

Get paid for your opinions! Click on the banner above to join Planet Pulse. Its totally free to sign up, and you can earn UNLIMITED. Find out more by visiting PLANET PULSE.
Sign up for PayPal and start accepting credit card payments instantly. http://www.emailcashpro.com
July Code Blog Copyright © 2010 Blogger Template Designed by Bie Blogger Template