PRB: ODBC - Call Failed Error When Appending Record in Access (148721)
The information in this article applies to:
- Microsoft ODBC Driver for Visual FoxPro 1.0
This article was previously published under Q148721 SYMPTOMS
If you attach a FoxPro table to a Microsoft Access version 7.0 database,
and do not fill all the fields in a new record, the following errors are
displayed when you move off the record:
ODBC- Call Fail
Field <field_name> does not accept NULL values
CAUSE
Moving the record pointer commits the data to the table. The data contains
NULL values. However, the structure of the Visual FoxPro table does not
allow NULL values, and changes cannot be saved to the Visual FoxPro table.
The "AllowZero Length" property of a field in an Access table controls the
default value of fields. When it is set to No, the default in Access
version 7.0, fields are initialized to NULL. Therefore, if you append a new
record and do not fill all of the fields, some fields will have a NULL
value. This is causing the error message because the linked table does not
allow NULL values.
WORKAROUND
You can ensure that the fields in the Visual FoxPro table accept NULL
values by checking the NULL setting in the Visual FoxPro Table Designer.
Use the following step-by-step procedure to achieve this:
- Start Visual FoxPro and open the database that contains the table.
- Right click the table and select Modify.
- When the Table Designer is opened, select the NULL check box for every
field.
STATUS
Microsoft is researching this behavior and will post new information here
in the Microsoft Knowledge Base as it becomes available.
Modification Type: | Major | Last Reviewed: | 3/10/2000 |
---|
Keywords: | kbprb KB148721 |
---|
|