Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Cannot insert the value NULL into column TASKIDCannot insert the value NULL into column TASKID
Previous
 
Next
New Post
11/30/2012 3:26 PM
 
Hello, all...I'm to the point in the TaskManager project where I'm trying to write my first record, and I'm getting the following error message: Cannot insert the value NULL into column TaskID.The program thread takes me into the routine "AddTask" in program SQLDATAPROVIDER.CS, which is where it returns the error.From initial investigation it looks like AddTask is a "black box"; it does no good to alter the value of TaskID going into it, because the field is created fresh (again) within AddTask.Can someone help me out here ???THANKS FOR YOUR HELP IN ADVANCE !!!Jeff
 
New Post
12/1/2012 10:11 AM
 
check the data type for TaskID in your table using Sql Server Management Studio - it should be specified as identifier = yes with an intitial value of 1 and autoincrement of 1 - no value should (or should need to) be provided for TaskID by the AddTask interface.
 
New Post
12/1/2012 2:40 PM
 
YOU THE MAN, BILL... No wonder everyone says you're so good.Good news and bad news... Your suggestion apparently solved the "NULL into the INTEGER field" problem, but now I'm getting a different error: A critical error has occurred. Input string was not in a correct format.I thought I'd let you know about your good advice. I'll press on with solving the other error.Jeff
 
New Post
12/1/2012 5:36 PM
 
Your advice helped, Bill.What I eventually found was that I could make the needed change thru SSMS, but every time I needed to delete and recreate the SQL files (basically every time I made a change and had to re-build and reload the PACKAGE.SOURCE file, the change would disappear. In other words, the change via SSMS works for the life of that particular TASKMANAGER file only.After thinking about it a couple of minutes, I realized I had to figure out a way to change the CREATE TABLE statement so that every time the table is created it would contain the needed change. Here it is:SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TABLE dbo.DNNBLUE01_TaskManager_Task( [TaskID] [int] IDENTITY(1,1), [TaskName] [nvarchar](max) NOT NULL, [TaskDescription] [nvarchar](max) NOT NULL, [AssignedUserId] [int] NULL, [ModuleId] [int] NOT NULL, [TargetCompletionDate] [datetime] NULL, [CompletedOnDate] [datetime] NULL, [ContentItemId] [int] NULL, [CreatedOnDate] [datetime] NOT NULL, [CreatedByUserId] [int] NOT NULL, [LastModifiedOnDate] [datetime] NOT NULL, [LastModifiedByUserId] [int] NOT NULL, ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO I added the phrase " IDENTITY(1,1)" to the TASKID line, and it works !!! I have verified it by checking the contents of the TASKMANAGER table inside WEBMATRIX.WOOOHOOOO !!! THANKS FOR YOUR HELP, BILL !!! I never could have done it without you.Jeff
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Cannot insert the value NULL into column TASKIDCannot insert the value NULL into column TASKID


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out