StrataFrame Forum

SharedDataTableKey - CurrentRow Index out of range

http://forum.strataframe.net/Topic9181.aspx

By Tim Dol - 5/29/2007

I have two forms sharing the same business object and I'm using the SharedDataTableKey feature and set the SharedDataTableKeyShareRowIndex = True.

In general everything work fine however when I try to access one of the fields on my business object, Example MyBO.RecID... I get an error CurrentRow Index out of range.

I tried navigating to a specific row before opening my child form and it still happens.  Do I have to set something else?

Thanks

Tim

By Richard Keller - 3/14/2008

See post http://forum.strataframe.net/Topic14890-10-1.aspx
By Trent L. Taylor - 3/14/2008

In general everything work fine however when I try to access one of the fields on my business object, Example MyBO.RecID... I get an error CurrentRow Index out of range.

I tried navigating to a specific row before opening my child form and it still happens.  Do I have to set something else?

I could see this happening in a multitude of circumstances when using a shared data table and allowing the index to be moved as well.  The reason that this could happen is that a filter or sort may be applied or a binding related issue.  If you are using a shared data table accross multiple BOs that allow that record to be modified on two different forms, then I would rethink this logic.  Richard pointed to another post that he placed, and I asked him for a sample and gave some additional explanation.  You are welcome to shoot me a simple sample reproducing the issue as well since his may be a different scenario.

The shared data table is a great feature, but should not be use everywhere.  If you have a BO on a maintnenace for maintaining a record, I would lean away from allowing that BO to use a shared data table if at the same time you are going to be allowing that same data table to be manipulated by another dialog or BO.

The shared data table is a great way to have a cache that is commonly referenced, but this is not a wholesale solution for every BO (which I don't think that you are using).  Just some comments I thought I would add for those using the shared data table on a lot of BOs.