PBDR.COM

About   -   Contact   -   Purchase   -   Search   -   What's New

 
 
Update Multiple Tables from a single Datawindow
Although the Datawindow painter does not allow you to update multiple tables. You can add this functionality to the Datawindow.

All of the datawindows attributes are updateable through the modify command or the dot notation. The update specifications that you specify in the Rows Update menu item are accessible in the same way as other attributes. The attributes you will need to set are the Update and Key attribute of the columns you want to update, then the UpdateTable attribute of the Datawindow.Table object.

Add a new function to the datawindow and pass the definition of your update tables to the function. The best way to do this is to create a structure which contains the table, columns and key columns. You can then pass an unbound array of these structures to the function. In the new function you would loop through the array elements using the structures attributes to swap the datawindow attributes with the passed values. Then call the Update() function with the no reset buffer option.

After all the updates are successful you would COMMIT the changes and call the ResetUpdate() function of the datawindow to reset the buffers.

 

Top of Page

Legal Notice

Ken Howe 2011