Page 1 of 1

Updating a remote MySQL DB from client DBGrid

Posted: Sat 01 Dec 2007 14:57
by Bryan
Hello all,

I'm new to MySQL and MyDac.
I have successfully been able to connect to my remote MySQL DB and run a query and populate a DB Grid on my test client app.

My question is does anyone have an example on how to change the data in the DB Grid, then have those changes post back to the remote MySQL DB?

I'm sure it would be done with SQL update command, but how do I get that from the DB Grid.

A quick example or advise would be greatly appreciated.

Thanks!
Bryan

Posted: Sat 01 Dec 2007 15:20
by Bryan
Never mind...

I see that this is done automatically when I change the data in the DB Grid.

On the other hand, is there anything I need to worry about when doing this?

Thanks!
Bryan

Posted: Mon 03 Dec 2007 13:53
by Antaeus
You can also use the TDBNavigator component with TDBGrid. It simplifies data editing. You will find this component at the Data Controls tab of the Palette.
You can also setup queries to be performed when editing data by yourself. This may be necessary for complicated SELECT queries, and for more flexible management of data editing. For more information please see the UpdateSQL demo of MyDAC, and read description of the TMyUpdateSQL component in the MyDAC help.