PRB: ODBC Error: Column <xxx> in Table <yyy> May Not Be Null (140654)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 6.0
- Microsoft Data Access Components 2.5
This article was previously published under Q140654 SYMPTOMS
When committing a new record to a remote view, you may receive this error:
Connectivity error: [Microsoft][ODBC SQL Server Driver][SQL Server]
The column <xxx> in table <yyy> may not be null.
Where <xxx> is the name of the remote data's field and <yyy> is the name of
the table to which the record is being added.
CAUSE
This error can occur for two reasons:
- When you add a record to a remote table, all fields in the view must be
marked as updatable. Usually the key field is not marked as updatable by
default, which will cause this error to occur with <xxx> being the name
of the key field.
-or-
- The new record is not completely entered with data and one of the fields
is updated as .NULL. instead of being given a valid value for the data
type. For example a SQL Server bit data type cannot accept .NULL.
values; it requires a logical True (.T.) or False (.F.) to be in the
Visual FoxPro remote view. If it isn't, <xxx> will be the name of the
field that requires a non-null value.
RESOLUTION
Mark the key field as updatable or fill the field that can't support null
values with valid data.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 12/3/2003 |
---|
Keywords: | kbprb KB140654 |
---|
|