Group: StrataFrame Users
Posts: 322,
Visits: 529
|
Hi All.
This is very bizarre. I am getting this error:
BusinessLayerException The CurrentRow for table '[dbo].[cost_types]' could not be evaluated because the CurrentRowIndex is out of range. Business object record count: 0. CurrentRowIndex: -1.
Source : MicroFour StrataFrame Business
Stack Trace: at MicroFour.StrataFrame.Business.BusinessLayer.get_CurrentRow() at CI_BusinessObjects.boCost_types.get_savings_type_FK() in C:\CI_BusinessObjects\CI_BusinessObjects\boCost_types.Designer.cs:line 283 at CI_BusinessObjects.boCost_types.GetCostTypesBySavingsType(Int32 SavingsType_FK) in C:\CI_BusinessObjects\CI_BusinessObjects\boCost_types.cs:line 56 at StlCI_new_winforms.Cost_types.RequeryCosts() in C:\StlCI_new_winforms\StlCI_new_winforms\Cost_types.cs:line 32 at StlCI_new_winforms.Cost_types.cboSavings_Type_SelectionChangeCommitted(Object sender, EventArgs e) in C:\StlCI_new_winforms\StlCI_new_winforms\Cost_types.cs:line 21 at System.Windows.Forms.ComboBox.OnSelectionChangeCommitted(EventArgs e) at System.Windows.Forms.ComboBox.OnSelectionChangeCommittedInternal(EventArgs e) at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m) at System.Windows.Forms.ComboBox.WndProc(Message& m) at MicroFour.StrataFrame.UI.Windows.Forms.ComboBox.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m) at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
when I try to fill my business object. The current row index SHOULD be zero because the business object has no data. However, this should not be throwing an error.
Any ideas what is wrong? Here is my code:
if (cboSavings_Type.SelectedValue != null)
{
Int32 Savings_Type_PK = Convert.ToInt32(cboSavings_Type.SelectedValue.ToString());
object[] oParms = new object[1];
oParms[0] = Savings_Type_PK;
boCost_types.GetCostTypesBySavingsType(Convert.ToInt32(cboSavings_Type.SelectedValue.ToString()));
}
TIA
Marcia
|