Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Database Not Updating
Message
From
07/01/2003 11:39:52
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00738492
Message ID:
00738829
Views:
26
Yeah, I think I know what you mean now. You are using the ComboBox for navigation, correct? But you're not doing it correctly. You never move to the 5th row and you're always updating the 1st row. In some change event for the ComboBox (probably the SelectedIndexChanged event) you need to change your BindingContext.Position to the appropriate row. That should solve your problem ...

What threw me off is that I thought you said that the DataSet was changing ok, but the Database was not updating. This wasn't the case ....

~~Bonnie



>Ok, assume I selected the first Row in the ComboBox, and then updated the data according to the following fields:
>User Name: Ahmad
>Title: System Analyst
>Then I clicked the Save button, data saved correctly. RowState is Updated
>
>Now, I’ll select another row from the ComboBox, say the 5th row in the ComboBox list, and updated the data as follows:
>User Name: Sara
>Title: Developer
>Then I clicked the Save button. RowState is UnChanged
>
>Now what happens, the first Row (Record) which having “Ahmad” value in “UserName” Field, is replaced with “Sara”, and “Title” filed with value “Systems Analyst” replaced with “Developer”.
>
>And the 5th Row still having the old data.
>Hope it’s clear now
>
>
>
>
>
>>Sorry Ahmad, I'm still not following what you are saying. =(
>>
>>
>>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform