Suggestions for allowing editing of stored proc results

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
morris55
Posts: 2
Joined: Fri 18 Apr 2008 07:06

Suggestions for allowing editing of stored proc results

Post by morris55 » Fri 18 Apr 2008 07:28

Hi
I'm new to BCP and MySQL, years of MS immersion.
I'm trying to use stored procedures to read customised rows then write update back, to a MySQL database.

Ive used a TMyStoredProc to get the data which is then linked to a TMS TDBAdvGrid. This shows the data but won't allow edits. I was hoping that edits to the fields in the DataSet would be allowed and then I could respond to cell edit events and write the databack.

But it's just not happening. I suspect that the DataSet is not editable so the grid is not allowing edits. If there is no easy solution to the config of the StoredProc object, then what would be the most suitable alternative object for the underlying DataSet. And is there a 'Fill' function to dump the results from the StoredProc to this DataSet?

Hopefully I have just missed something obvious :oops:
Thanks
Greg

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 18 Apr 2008 11:21

You can edit a dataset that TMyStoredProc returns using editing functions. If you want to edit the dataset by DBGrid, you should link it up by the MyStoredProc.DataSource property.
Could you show your code and the stored procedure?

morris55
Posts: 2
Joined: Fri 18 Apr 2008 07:06

Post by morris55 » Wed 23 Apr 2008 08:28

Thanks for the response ...
I was doing all those things. ...
After restarting the whole process I found that I had the 'Unidirectional' flag set. Resetting this brought it all to life.

Thanks for trying
Greg

Post Reply