- Gregory Rusak
- PowerBuilder
- Wednesday, 11 August 2021 10:56 PM UTC
Hello Appeon people,
It appears that in PowerBuilder 2019 R2, ShareData will return -1 if you share the data back with the original dataobject that shared the data in the first place.
I've put together and attached the exported source code for a Window and Datawindow that will exhibit this behaviour.
On the left,
1. Click the Create Datastore button to create a datastore object and assign the dataobject 'd_sharedata_test'
2. Click the Insert Row to Datastore button to insert a row and set the value of s_column_a to 'A'.
3. Click the ShareData with DataWindow button to share the data and note one row appears with the value 'A'
4. Now edit the datawindow and change the value of s_column_b to 'B'
5. Click the Sharedata back with Datastore button which does an accepttext() and shares the data back with the initial datastore object.
6. Note the messagebox indicating the sharedata has failed.
But on the right,
1. Create the datastore.
2. Insert a row into the datawindow setting the value of s_column_a to 'A'
3. Edit column b and set it to the value 'B', then
4. Click the Sharedata back with Datastore, the messagebox indicates the sharedata was successful.
Why is this happening?
Your attention to this is greatly appreciated.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.