Home All Groups Group Topic Archive Search About
Author
13 Jun 2006 1:31 PM
restucci
I am attempting to update/insert to a Microsoft Access Database. I have
a database column that is unfortunately using a the reserved word
'output'. Changing this name isn't a very viable option (at least not
now). My problem is that I cannot get the database to update using .net
because it gives me the following error: "The field
'tblTimesheetEntries.Output' cannot contain a Null value because the
Required property for this field is set to True.  Enter a value in this
field." It's all bound correctly on the page and I'm pretty sure it
is a problem with using the reserved word 'output'. The column name
output is bracketed ([output]) in the update and insert statements. If
anyone knows of a workaround for this it would be greatly appreciated.

Jimmy

Author
13 Jun 2006 2:37 PM
Marina Levit [MVP]
The message doesn't look like a reserved word issue.  It looks like the
update statement being generated is trying to set this field to NULL.

<restu***@gmail.com> wrote in message
Show quote
news:1150205503.269815.52620@h76g2000cwa.googlegroups.com...
>I am attempting to update/insert to a Microsoft Access Database. I have
> a database column that is unfortunately using a the reserved word
> 'output'. Changing this name isn't a very viable option (at least not
> now). My problem is that I cannot get the database to update using .net
> because it gives me the following error: "The field
> 'tblTimesheetEntries.Output' cannot contain a Null value because the
> Required property for this field is set to True.  Enter a value in this
> field." It's all bound correctly on the page and I'm pretty sure it
> is a problem with using the reserved word 'output'. The column name
> output is bracketed ([output]) in the update and insert statements. If
> anyone knows of a workaround for this it would be greatly appreciated.
>
> Jimmy
>
Author
13 Jun 2006 2:39 PM
Kerry Moorman
Jimmy,

Using [output] is all you should need to do to use the Access reserved word
as a column name.

I think you have some other problem.  I would follow the error message about
the null value.

Kerry Moorman


Show quote
"restu***@gmail.com" wrote:

> I am attempting to update/insert to a Microsoft Access Database. I have
> a database column that is unfortunately using a the reserved word
> 'output'. Changing this name isn't a very viable option (at least not
> now). My problem is that I cannot get the database to update using .net
> because it gives me the following error: "The field
> 'tblTimesheetEntries.Output' cannot contain a Null value because the
> Required property for this field is set to True.  Enter a value in this
> field." It's all bound correctly on the page and I'm pretty sure it
> is a problem with using the reserved word 'output'. The column name
> output is bracketed ([output]) in the update and insert statements. If
> anyone knows of a workaround for this it would be greatly appreciated.
>
> Jimmy
>
>
Author
13 Jun 2006 5:21 PM
restucci@gmail.com
Thank you all very much for the responses. After I looked at the table
again i realized that there was no primary key defined. I added a
primary key and that took care of all of the problems.

AddThis Social Bookmark Button