Consultor Eletrônico



Kbase 18005: How to Update a SmartDataBrowser Connected to a Database?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   08/08/2006
Status: Unverified

GOAL:

How to update data in a SmartDataBrowser which is connected to a database rather than a SmartDataObject.

GOAL:

How to Update a SmartDataBrowser Connected to a Database?

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x

FIX:

1) Create a SmartDataObject for the table and fields that you wish to update.

2) Create a SmartDataBrowser that is connected to a database for the table and fields that you wish to update.

3) Create a SmartWindow and drop the SmartDataObject onto the window.

4) Drop the SmartDataBrowser onto the SmartWindow and link it to the SmartDataObject with an update link (the SmartDataBrowser is the update-source for the SmartDataObject). The SmartDataBrowser is not intended for updating, it should have a thin user interface. To do an update the SmartDataObject is needed as an update target even though it is not the data source.
This preserves the separation of UI from data management.

5) Drop an update SmartPanel onto the SmartWindow and link it to the SmartDataBrowser with a tableio link.

Now you should be able to add and update information in the SmartDataBrowser and it is using the SmartDataObject to perform its updates.

If you were to create the same SmartWindow described above without the SmartDataObject linked to the SmartDataBrowser you would get the following errors when attempting to add or update information in the browser:

No Update Target present for Add operation.

No Update Target present for Save operation.