﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » SharedDataTable is missing</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 00:58:26 GMT</lastBuildDate><ttl>20</ttl><item><title>SharedDataTable is missing</title><link>http://forum.strataframe.net/FindPost27273.aspx</link><description>Hi,&lt;br&gt;
I have problem as below. It seem like the sharedDataTable is just gone or its key just changed. May I know in what condition it could happen? I am using 1.6.9.9. I can't upgrade now.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
The given key was not present in the dictionary.&lt;br&gt;
&lt;br&gt;
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. &lt;br&gt;
&lt;br&gt;
Exception Details: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.&lt;br&gt;
&lt;br&gt;
Source Error: &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Line 239:                    {&lt;br&gt;
Line 240:                        this.GetBackupPendingLeaves();&lt;br&gt;
Line 241:                        this.LVELeaves.Refresh();&lt;br&gt;
Line 242:                        this.grdvPendingLeaves.DataBind();&lt;br&gt;
Line 243:&lt;br&gt;
&lt;br&gt;
Source File: D:\FlexHR\Trunk\Mainline\Leave\UI\Web\Forms\FormBackupPendingLeaves.aspx.cs    Line: 241 &lt;br&gt;
&lt;br&gt;
Stack Trace: &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
[KeyNotFoundException: The given key was not present in the dictionary.]&lt;br&gt;
   System.ThrowHelper.ThrowKeyNotFoundException() +28&lt;br&gt;
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +7456284&lt;br&gt;
   MicroFour.StrataFrame.Business.SharedDataTableCollection.get_Item(String SharedTableKey) +47&lt;br&gt;
   MicroFour.StrataFrame.Business.BusinessLayer.get__CurrentDataTable(Boolean IsSharedTable) +202&lt;br&gt;
   MicroFour.StrataFrame.Business.BusinessLayer.get__CurrentDataTable() +41&lt;br&gt;
   MicroFour.StrataFrame.Business.BusinessLayer.RefreshBoundControls() +76&lt;br&gt;
   MicroFour.StrataFrame.Business.BusinessLayer.Refresh() +31&lt;br&gt;
   Vfs.Leave.UI.Web.Forms.FormBackupPendingLeaves.submitDocument(String action) in D:\FlexHR\Trunk\Mainline\Leave\UI\Web\Forms\FormBackupPendingLeaves.aspx.cs:241&lt;br&gt;
   Vfs.Leave.UI.Web.Forms.FormBackupPendingLeaves.btnApprove_Click(Object sender, EventArgs e) in D:\FlexHR\Trunk\Mainline\Leave\UI\Web\Forms\FormBackupPendingLeaves.aspx.cs:153&lt;br&gt;
   DevExpress.Web.ASPxEditors.ASPxButton.OnClick(EventArgs e) +101&lt;br&gt;
   DevExpress.Web.ASPxEditors.ASPxButton.RaisePostBackEvent(String eventArgument) +406&lt;br&gt;
   DevExpress.Web.ASPxClasses.ASPxWebControl.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10&lt;br&gt;
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13&lt;br&gt;
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36&lt;br&gt;
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565&lt;br&gt;</description><pubDate>Mon, 07 Jun 2010 13:01:34 GMT</pubDate><dc:creator>ChanKK</dc:creator></item><item><title>RE: SharedDataTable is missing</title><link>http://forum.strataframe.net/FindPost27320.aspx</link><description>Hey Chan.&lt;/P&gt;&lt;P&gt;I know for a fact that there has been some changes in this area lately. What I would suggest you right now would be&amp;nbsp;to load on a virtual or test machine, download the most recent update build and see if it gets resolved.</description><pubDate>Mon, 07 Jun 2010 13:01:34 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: SharedDataTable is missing</title><link>http://forum.strataframe.net/FindPost27317.aspx</link><description>any good news??</description><pubDate>Mon, 07 Jun 2010 11:11:21 GMT</pubDate><dc:creator>ChanKK</dc:creator></item><item><title>RE: SharedDataTable is missing</title><link>http://forum.strataframe.net/FindPost27298.aspx</link><description>Hi&lt;br&gt;
Sorry for unclear info.&lt;br&gt;
I am using Web Business Binding Source for ASP.NET development. ShareDataTable is turned on automatically&lt;br&gt;
&lt;br&gt;
Thank you</description><pubDate>Wed, 02 Jun 2010 20:51:43 GMT</pubDate><dc:creator>ChanKK</dc:creator></item><item><title>RE: SharedDataTable is missing</title><link>http://forum.strataframe.net/FindPost27283.aspx</link><description>Hi Chan.&lt;/P&gt;&lt;P&gt;I am probably missing the point and I am sorry for this, but I couldn't see where you are sharing the tables, couldn't find where you set the SharedDataTableKey. Someone will probably chime in here and help us with that.</description><pubDate>Wed, 02 Jun 2010 07:44:22 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: SharedDataTable is missing</title><link>http://forum.strataframe.net/FindPost27282.aspx</link><description>Hi,&lt;br&gt;
[b]MasterPage[u][/u][/b]&lt;br&gt;
[quote]&lt;br&gt;
public void MasterPage.Page_Load()&lt;br&gt;
{&lt;br&gt;
            if (!this.IsPostBack)&lt;br&gt;
            {&lt;br&gt;
                this.InitializeBackupLeavesListing(this._employees.EmployeeNo);&lt;br&gt;
            }&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
private void InitializeBackupLeavesListing(string backupEmployeeNo)&lt;br&gt;
        {&lt;br&gt;
            LVELeavesBO leavesBO;&lt;br&gt;
            LVELeavesBO leavesBackupBO;&lt;br&gt;
&lt;br&gt;
            bool isLoaded = SessionManager.Instance.Get&lt;bool&gt;(SessionVariableConstants.IS_PENDING_FOR_BACKUP_LEAVES_LOADED);&lt;br&gt;
&lt;br&gt;
            if (isLoaded)&lt;br&gt;
            {&lt;br&gt;
                leavesBackupBO = SessionManager.Instance.Get&lt;LVELeavesBO&gt;(SessionVariableConstants.PENDING_FOR_BACKUP_LEAVES_BO);&lt;br&gt;
            }&lt;br&gt;
            else&lt;br&gt;
            {&lt;br&gt;
                leavesBO = new LVELeavesBO();&lt;br&gt;
                leavesBackupBO = new LVELeavesBO();&lt;br&gt;
&lt;br&gt;
                object value = SessionManager.Instance.Get(SessionVariableConstants.CURRENT_SYSDOCID);&lt;br&gt;
                Guid SysDocId = Guid.Empty;&lt;br&gt;
&lt;br&gt;
                if (value != null)&lt;br&gt;
                {&lt;br&gt;
                    SysDocId = new Guid(value.ToString());&lt;br&gt;
                }&lt;br&gt;
&lt;br&gt;
                BackupsBO BackupsPendingList = new BackupsBO();&lt;br&gt;
&lt;br&gt;
                BackupsPendingList.FillByBackupEmployeeNoBySysDocByPeriod(backupEmployeeNo, SysDocId, DateTime.Today);&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
                if (BackupsPendingList.Count &gt; 0)&lt;br&gt;
                {&lt;br&gt;
                    if (BackupsPendingList.MoveFirst())&lt;br&gt;
                    {&lt;br&gt;
                        do&lt;br&gt;
                        {&lt;br&gt;
                            leavesBO.FillPendingLeavesByApprover(BackupsPendingList.ApproverEmployeeNo);&lt;br&gt;
                            leavesBackupBO.CopyDataFrom(leavesBO, MicroFour.StrataFrame.Business.BusinessCloneDataType.AppendDataToTableFromCompleteTable);&lt;br&gt;
                        }&lt;br&gt;
                        while (BackupsPendingList.MoveNext());&lt;br&gt;
                    }&lt;br&gt;
&lt;br&gt;
                    SessionManager.Instance.Set(SessionVariableConstants.PENDING_FOR_BACKUP_LEAVES_BO, leavesBackupBO);&lt;br&gt;
                    SessionManager.Instance.Set(SessionVariableConstants.IS_PENDING_FOR_BACKUP_LEAVES_LOADED, true);&lt;br&gt;
                }&lt;br&gt;
            }&lt;br&gt;
        }&lt;br&gt;
&lt;br&gt;
private void UpdateBackupPendingTaskCount()&lt;br&gt;
        {&lt;br&gt;
            int count = 0;&lt;br&gt;
            LVELeavesBO leavesBackupBO;&lt;br&gt;
&lt;br&gt;
            if (!SessionManager.Instance.Get&lt;bool&gt;(SessionVariableConstants.IS_PENDING_FOR_BACKUP_LEAVES_LOADED))&lt;br&gt;
            {&lt;br&gt;
                this.InitializeBackupLeavesListing(this._employees.EmployeeNo);&lt;br&gt;
            }&lt;br&gt;
&lt;br&gt;
            leavesBackupBO = SessionManager.Instance.Get&lt;LVELeavesBO&gt;(SessionVariableConstants.PENDING_FOR_BACKUP_LEAVES_BO);&lt;br&gt;
&lt;br&gt;
            if (leavesBackupBO != null &amp;&amp; leavesBackupBO.Count &gt; 0)&lt;br&gt;
            {&lt;br&gt;
                string filterExpr = leavesBackupBO.Filter;&lt;br&gt;
&lt;br&gt;
                leavesBackupBO.Filter = "DocStatus IN (" + DocStatusType.Pending.GetHashCode() + "," + DocStatusType.PendingForBeforeApprove.GetHashCode() + "," + DocStatusType.PendingForAfterApproved.GetHashCode() + ")";&lt;br&gt;
&lt;br&gt;
                count = leavesBackupBO.Count;&lt;br&gt;
&lt;br&gt;
                leavesBackupBO.Filter = filterExpr;&lt;br&gt;
            }&lt;br&gt;
&lt;br&gt;
            // Update Total Pending Leaves by Approver Employee No &lt;br&gt;
            if (this._navigations.Seek("IsBackup"))&lt;br&gt;
            {&lt;br&gt;
                NavBarItem barItem = this.BaseNavigationBar1.Items.FindByName(this._navigations.NavigationId.ToString());&lt;br&gt;
&lt;br&gt;
                if (barItem != null)&lt;br&gt;
                {&lt;br&gt;
                    barItem.Text = barItem.Text + string.Format("({0})", count);&lt;br&gt;
                }&lt;br&gt;
            }&lt;br&gt;
        }&lt;br&gt;
&lt;br&gt;
 private void Page_PreRender(object sender, EventArgs e)&lt;br&gt;
        {&lt;br&gt;
            //----------------------------------------------------------------------------------&lt;br&gt;
            //-- Initialize pending / backup pending leave count only at this stage so that it&lt;br&gt;
            //-- always show the updated pending count&lt;br&gt;
            //----------------------------------------------------------------------------------&lt;br&gt;
            this.UpdateBackupPendingTaskCount();&lt;br&gt;
        }&lt;br&gt;
&lt;br&gt;
[/quote]&lt;br&gt;
&lt;br&gt;
[u]WebPage[b][/b][/u]&lt;br&gt;
[codesnippet][quote]&lt;br&gt;
 protected void Page_Load(object sender, EventArgs e)&lt;br&gt;
        {&lt;br&gt;
            this.Initialize();&lt;br&gt;
        }&lt;br&gt;
&lt;br&gt;
private void Initialize()&lt;br&gt;
        {&lt;br&gt;
            if (Convert.ToBoolean(SessionManager.Instance.Get(SessionVariableConstants.IS_PENDING_FOR_BACKUP_LEAVES_LOADED)))&lt;br&gt;
            {&lt;br&gt;
                this.LVELeaves.CopyDataFrom((LVELeavesBO)SessionManager.Instance.Get(SessionVariableConstants.PENDING_FOR_BACKUP_LEAVES_BO), MicroFour.StrataFrame.Business.BusinessCloneDataType.ClearAndFillFromCompleteTable);&lt;br&gt;
            }&lt;br&gt;
            else&lt;br&gt;
            {&lt;br&gt;
                this.GetBackupPendingLeaves();&lt;br&gt;
            }&lt;br&gt;
        }&lt;br&gt;
&lt;br&gt;
 private void GetBackupPendingLeaves()&lt;br&gt;
        {&lt;br&gt;
            EmployeesBO backupEmployees;&lt;br&gt;
            LVELeavesBO backupLeaves = new LVELeavesBO();&lt;br&gt;
&lt;br&gt;
            backupEmployees = SessionManager.Instance.Get(EmployeesBO.WebSessionVariable) as EmployeesBO;&lt;br&gt;
&lt;br&gt;
            this.BackupsPendingList.FillByBackupEmployeeNoBySysDocByPeriod(backupEmployees.EmployeeNo, SysDocId, DateTime.Today);&lt;br&gt;
&lt;br&gt;
            if (this.BackupsPendingList.Count &gt; 0)&lt;br&gt;
            {&lt;br&gt;
                this.LVELeaves.Clear();&lt;br&gt;
                if (this.BackupsPendingList.MoveFirst())&lt;br&gt;
                {&lt;br&gt;
                    do&lt;br&gt;
                    {&lt;br&gt;
                        backupLeaves.FillPendingLeavesByApprover(this.BackupsPendingList.ApproverEmployeeNo);&lt;br&gt;
                        this.LVELeaves.CopyDataFrom(backupLeaves, MicroFour.StrataFrame.Business.BusinessCloneDataType.AppendDataToTableFromCompleteTable);&lt;br&gt;
                    }&lt;br&gt;
                    while (this.BackupsPendingList.MoveNext());&lt;br&gt;
                }&lt;br&gt;
&lt;br&gt;
                SessionManager.Instance.Set(SessionVariableConstants.PENDING_FOR_BACKUP_LEAVES_BO, this.LVELeaves);&lt;br&gt;
                SessionManager.Instance.Set(SessionVariableConstants.IS_PENDING_FOR_BACKUP_LEAVES_LOADED, true);&lt;br&gt;
            }&lt;br&gt;
        }&lt;br&gt;
&lt;br&gt;
        protected void Page_Unload(object sender, EventArgs e)&lt;br&gt;
        {&lt;br&gt;
            SessionManager.Instance.Remove(SessionVariableConstants.IS_PENDING_FOR_BACKUP_LEAVES_LOADED);&lt;br&gt;
            SessionManager.Instance.Remove(SessionVariableConstants.PENDING_FOR_BACKUP_LEAVES_BO);&lt;br&gt;
        }&lt;br&gt;
[/quote]&lt;br&gt;
[/codesnippet]&lt;br&gt;
&lt;br&gt;</description><pubDate>Tue, 01 Jun 2010 21:28:28 GMT</pubDate><dc:creator>ChanKK</dc:creator></item><item><title>RE: SharedDataTable is missing</title><link>http://forum.strataframe.net/FindPost27277.aspx</link><description>Hi Chan.&lt;/P&gt;&lt;P&gt;Could you post the code where you think the problem is?</description><pubDate>Tue, 01 Jun 2010 08:32:21 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: SharedDataTable is missing</title><link>http://forum.strataframe.net/FindPost27275.aspx</link><description>Hi,&lt;br&gt;
I found that, if I remved code to call BO.CopyDataFrom() from GetBackupPendingLeaves() then would work fine. Beside, I have another screen which similar to this, but using FillBy...() and working fine as well.&lt;br&gt;
&lt;br&gt;
Any ideas?&lt;br&gt;
&lt;br&gt;
Thank you</description><pubDate>Tue, 01 Jun 2010 05:54:40 GMT</pubDate><dc:creator>ChanKK</dc:creator></item></channel></rss>