Page 1 of 1

Something for the Wishlist

Posted: Wed 20 Feb 2008 08:20
by Zero-G.
Hey

I would like to tell you a little feature, what would be nice, if you could implement it.

That the Wizzard can create Update Commands with RowVersion, by using the DataAdapter.

THX

Posted: Thu 21 Feb 2008 11:56
by Alexey.mdr
Could you please explain your suggestion?
Provide an analogy, if possible.

Posted: Thu 21 Feb 2008 12:33
by Zero-G.
Hey

What I mean is, the following situation:

I make a Select Statement with an DataAdapter. - I bind the DataAdapter to a Dataset. - This DataSet is showed to the user through a grid.
The application is a network active application. - & so somehwere else changes some data in the database.
Now the user, who sees the DataGrid, wants also to update the same Data. - And with the update command generated now, it would be updated. - But if there would be rowversion check, the will be told, that the Data he sees, is not up to date.

Code: Select all

UPDATE `row_version` SET `id` = :id, `value` = :value, `version` = :version WHERE ((`id` = :Original_id) AND ('value' = :Original_value) AND (`version` = :Original_version))
like the code above - Till yet, I have to do it by hand

Posted: Thu 21 Feb 2008 16:46
by Alexey.mdr
It's done automatically.
Follow me and you'll see:
- run Tools -> MySQL-> DataSet Wizard...
- configure a connection, choose tables, click “Next”
- click “Configure commands” button
- Update Commands tab, select Update radiobatton
- now you can see the UPDATE statement you were looking for