Solved

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

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

803 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