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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...column does not allow nulls. INSERT fails.column does not allow nulls. INSERT fails.
Previous
 
Next
New Post
8/17/2007 4:31 AM
 

Hello everybody,

I'm creating a DotnetNuke module with C# and VS2005. I'm using SQL Server 2000. I've created some tables with no errors. But if I try to modify a table adding a "ModuleID" column, of type integer,  I've got this error:

Cannot insert the value NULL into column 'ModuleID'....  column does not allow nulls. INSERT fails.

Why I've got this error? And why I've the error only if I try to modify an existing table, and not if I'm creating a new table?

Thanks.

 

 
New Post
8/17/2007 6:58 AM
 

If you try to add a colunm to an existing table that contains rows, and the column does not allow Null values, creation will fail as the new column for existing records does not get filled with default value but with Null. Solution: Allow null, update existing Records with valid moduleID and disallow Null afterwards.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
8/20/2007 4:19 AM
 

I've solved the problem. Thank you very much leupold.  

 
New Post
8/20/2007 7:05 AM
 


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...column does not allow nulls. INSERT fails.column does not allow nulls. INSERT fails.


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