lirving
Posts: 26
|
Posted: 07/09/2010, 6:47 AM |
|
This probably has an easy answer but the question may be a bit long winded
I am using the task manager and the intranet MS access database and all works fine the tables are "related" in access so when I add a record access automatically update the task_id field and inserts the record.
I imported the access data base into MS SQL server and re published the database Now when I go to add a record it fails with this error
"Cannot insert the value NULL into column 'task_id', table 'WesTM.dbo.tasks'; column does not allow nulls. INSERT fails. (Microsoft OLE DB Provider for SQL Server)"
SQL server does not add a new task_id value.
Edit and view operations are fine - because the task_id already exists
do I need a stored procedure if so what should it look like or am I missing something
Regards
Wayne
_________________
LW Irving
lirving@coffs.com.au |
|
|
lboeldt
Posts: 53
|
Posted: 07/09/2010, 8:41 AM |
|
Hi Wayne,
Go into your tasks' table design and add the identity specification to the task_id field. Here's a screenshot.
|
|
|
lirving
Posts: 26
|
Posted: 07/11/2010, 8:01 AM |
|
i had tried that but it made no difference
After reading your answer I tried again and realised that the table the table was not saving when i tried to force the change I got an error message that I could not save the changes to the table
But then I found the designer option to allow changes that require dropping the table
Now it works fine
Thanks for that Iboeldt
Regards
Wayne
_________________
LW Irving
lirving@coffs.com.au |
|
|
lboeldt
Posts: 53
|
Posted: 07/11/2010, 9:07 AM |
|
I'll bet you had records in the table. I shoulda thought of that, I'm glad you worked it out. Please prefix [resolved] to the title of this thread.
Here's a snapshot of how to access the additional setting wayne mentioned
LB
|
|
|