SharedDataTable usage


Author
Message
Ertan Deniz
Ertan Deniz
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 163, Visits: 493
For understanding the usage of the Shareddatatable ;

BusinessObject1 and BusinessObject2 are the two objects of same type. These are on different forms.

Each of them has an internal table. Let's say table1 anf table2.

After BusinessObject1.SharedDataTableKey is assigned with a key ( Mykey).

What happens ? (The second Object's SharedDataTableKey has not been assigned yet.)

Does the framework allocate a new datatable for sharing ?

After BusinessObject2.SharedDataTableKey is assigned with the same key ( Mykey).

BusinessObjects2 uses BusinessObject1's internal table as shareddatatable ? Is it correct ?

Ertan Deniz
Ertan Deniz
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 163, Visits: 493
Any Comment ?
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K

What happens ? (The second Object's SharedDataTableKey has not been assigned yet.)

Does the framework allocate a new datatable for sharing ?

No.  They share the same data table.  I recommend opening up the source and taking a look as this is the best way to understand how it works.  There is a collection on the BusinessLayer called _SharedDataTables that gets pulled from when accessing the CurrentDataTable of the business object.  If you have the SharedDataTableKey set, it will pull from the shared collection versus the internal data table.  If a key does not exists within the shared collection when accessed, it will then create a data table for that key in the shared data table collection.

Ertan Deniz
Ertan Deniz
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 163, Visits: 493
Thanks. It is so clear. 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search