Re: Detecting Changes to a dataform question



normally you keep the old values, and check that they still match (someone
else hasn't changed the record). this means it better to detect user changes
independant of the database. datasets are common for this.

-- bruce (sqlwork.com)




<needin4mation@xxxxxxxxx> wrote in message
news:1127746547.006281.61510@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi, I have an asp.net 1.1 application that populates data from a
> database. When the user changes data, they have to hit a button to
> update the data. The data entry form (same form that is populated) is
> from several different tables. To the user, of course, this is not
> seen.
>
> Scenario: After the page is populated, assume a change is made to the
> form and the user hits update. The page then goes back, reads the
> database for that record and then compares the results to what the user
> typed in. If it is the same, it goes to the next set of controls to
> check. If it is diffent, it does an update mytable set to the
> database.
>
> Example: An address:
>
> The populate form has 123 Main St. MyTown, CA. 999999
>
> The user changes this to 124 Main St. Dallas, Tx. 4444477
>
> The user hits update. The database reads the database. It gathers
> values. It compares the values to what the user submitted just now and
> if there are changes, it updates that row. If not it leaves it.
>
> My question is is this the wrong way to do it? It "feels" wrong.
> Thanks.
>


.