Click here to Skip to main content
15,897,371 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to build online survey? Pin
ednrgc23-Oct-06 3:09
ednrgc23-Oct-06 3:09 
QuestionHow to add parameter for 'In' clause Pin
robert11020-Oct-06 9:22
robert11020-Oct-06 9:22 
AnswerRe: How to add parameter for 'In' clause Pin
ednrgc20-Oct-06 9:29
ednrgc20-Oct-06 9:29 
GeneralVoting request... Pin
Clickok20-Oct-06 8:35
Clickok20-Oct-06 8:35 
AnswerRe: Voting request... Pin
Guffa20-Oct-06 12:18
Guffa20-Oct-06 12:18 
GeneralRe: Voting request... Pin
Clickok20-Oct-06 12:29
Clickok20-Oct-06 12:29 
AnswerRe: Voting request... Pin
Guffa20-Oct-06 13:35
Guffa20-Oct-06 13:35 
GeneralRe: Voting request... Pin
Clickok20-Oct-06 14:05
Clickok20-Oct-06 14:05 
Guffa wrote:
The DetailsView does not change the values to null, it just leaves the values as they were.

FALSE!!! It is the EXACT PROBLEM!!!

Guffa wrote:
If you don't populate the values first

I'm populating correctly...

Guffa wrote:
So, it's not the DetailsView that sets the values to null, it's you.

FALSE again... My Select procedure fully populate all fields... but the DetailsView does not maintain the fields what is not used as BoundFields.

Please, follow the link:
Working with Data in ASP.NET 2.0 :: Examining the Events Associated with Inserting, Updating, and Deleting
[^] by Scott Mitchel
In the editing interfaces from the previous tutorial all product fields that were not read-only had to be included. If we were to remove a field from the GridView - say QuantityPerUnit - when updating the data the data Web control would not set the ObjectDataSource's QuantityPerUnit UpdateParameters value. The ObjectDataSource would then pass in a value of Nothing into the UpdateProduct Business Logic Layer (BLL) method, which would change the edited database record's QuantityPerUnit column to a NULL value. Similarly, if a required field, such as ProductName, is removed from the editing interface, the update will fail with a "Column 'ProductName' does not allow nulls" exception. The reason for this behavior was because the ObjectDataSource was configured to call the ProductsBLL class's UpdateProduct method, which expected an input parameter for each of the product fields. Therefore, the ObjectDataSource's UpdateParameters collection contained a parameter for each of the method's input parameters.

If we want to provide a data Web control that allows the end user to only update a subset of fields, then we need to either programmatically set the missing UpdateParameters values in the ObjectDataSource's Updating event handler or create and call a BLL method that expects only a subset of the fields.


Understood? I think wrong these behaviour, because in the SELECT method I get all fields, but in UPDATE, DetailsView place NULL in not used fields Frown | :( (Frown | :(



Jesus is Love! Tell to someone! Badger | [badger,badger,badger,badger...]

GeneralRe: Voting request... Pin
Guffa20-Oct-06 15:37
Guffa20-Oct-06 15:37 
GeneralRe: Voting request... Pin
Clickok20-Oct-06 17:14
Clickok20-Oct-06 17:14 
GeneralRe: Voting request... Pin
Guffa20-Oct-06 19:05
Guffa20-Oct-06 19:05 
GeneralRe: Voting request... Pin
ednrgc23-Oct-06 3:09
ednrgc23-Oct-06 3:09 
QuestionCalendar Control Pin
benno141220-Oct-06 7:08
benno141220-Oct-06 7:08 
AnswerRe: Calendar Control Pin
Jerry Hammond20-Oct-06 8:25
Jerry Hammond20-Oct-06 8:25 
GeneralRe: Calendar Control Pin
benno141220-Oct-06 8:52
benno141220-Oct-06 8:52 
QuestionCan anyone suggest a simple ASP project Pin
Meena T Shivaram20-Oct-06 4:54
Meena T Shivaram20-Oct-06 4:54 
AnswerRe: Can anyone suggest a simple ASP project Pin
Jerry Hammond20-Oct-06 5:55
Jerry Hammond20-Oct-06 5:55 
GeneralRe: Can anyone suggest a simple ASP project Pin
Meena T Shivaram20-Oct-06 6:20
Meena T Shivaram20-Oct-06 6:20 
AnswerRe: Can anyone suggest a simple ASP project Pin
postmaster@programmingknowledge.com20-Oct-06 6:41
postmaster@programmingknowledge.com20-Oct-06 6:41 
GeneralRe: Can anyone suggest a simple ASP project Pin
Meena T Shivaram20-Oct-06 6:53
Meena T Shivaram20-Oct-06 6:53 
GeneralRe: Can anyone suggest a simple ASP project Pin
Jerry Hammond20-Oct-06 8:27
Jerry Hammond20-Oct-06 8:27 
AnswerRe: Can anyone suggest a simple ASP project Pin
ednrgc20-Oct-06 7:11
ednrgc20-Oct-06 7:11 
GeneralRe: Can anyone suggest a simple ASP project Pin
Meena T Shivaram20-Oct-06 8:04
Meena T Shivaram20-Oct-06 8:04 
AnswerRe: Can anyone suggest a simple ASP project Pin
Clickok20-Oct-06 8:50
Clickok20-Oct-06 8:50 
AnswerRe: Can anyone suggest a simple ASP project Pin
Jon Sagara20-Oct-06 11:29
Jon Sagara20-Oct-06 11:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.