Something for the Wishlist

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Zero-G.
Posts: 391
Joined: Sat 09 Dec 2006 12:20

Something for the Wishlist

Post by Zero-G. » Wed 20 Feb 2008 08:20

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

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 21 Feb 2008 11:56

Could you please explain your suggestion?
Provide an analogy, if possible.

Zero-G.
Posts: 391
Joined: Sat 09 Dec 2006 12:20

Post by Zero-G. » Thu 21 Feb 2008 12:33

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

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 21 Feb 2008 16:46

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

Post Reply