Solved

Using EntityDataSoruce and nullable column. How do I set update the column in my db to null?

Posted on 2010-09-13
2
515 Views
Last Modified: 2012-05-10
Can anyone reliably get the EntityDataSource to save a nullable column to the databse as a "null" when bound to any of the controls, such as "FormView"?

I have tried using several different UpdateParameters (SessionParameter, ControlParamater, Parameter,  etc). I have tried setting "ConvertEmptyStringToNull" to true and leaving the property off entirely. Nothing works. On my "Inserts" it works fine (but obviously to insert a record, it has to insert "something" if there is no value.)

(I have made sure the column is set to nullable = true in the Entity Designer.....)

I have tried binding that column to a label and setting the text value of the label to "".

In all these cases, I can successfully set the column to a value, just not to NULL.
0
Comment
Question by:dbaGrant
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
karthitron earned 500 total points
ID: 33662379
You can refer below link in EE, which will guides you, how to update value as NULL.
http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_24318701.html 
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 33664416
you will need to explicily set it null in the entity object to have entity frame work to update it to the DB
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question