Solved

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

Posted on 2010-09-13
2
482 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now