bizObj.DataRow = (this.GetCurrentRow(bizObj.GetCurrentDataSet(), tableName)).Row;The error appears to be that because the table is empty, there are no rows to bind to.
at System.Windows.Forms.CurrencyManager.get_Item(Int32 index) at System.Windows.Forms.CurrencyManager.get_Current() at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.GetCurrentRow(DataSet ds, String tableName) at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.Cancel(mmBusinessObject bizObj, String tableName) at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.Cancel(mmBusinessObject bizObj) at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.AskSaveChanges(mmBaseBusinessObject bizObj) at DMS.TestCancel.AskSaveChanges(mmBaseBusinessObject bizObj) in d:\documents and settings\rick.hodder\my documents\visual studio projects\dms\testcancel.cs:line 99 at OakLeaf.MM.Main.Windows.Forms.mmBusinessBaseForm.AskSaveChanges() at DMS.TestCancel.AskSaveChanges() in d:\documents and settings\rick.hodder\my documents\visual studio projects\dms\testcancel.cs:line 94 at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.mmBaseForm_Closing(Object sender, CancelEventArgs e) at System.Windows.Forms.Form.OnClosing(CancelEventArgs e) at DMS.TestCancel.OnClosing(CancelEventArgs e) in d:\documents and settings\rick.hodder\my documents\visual studio projects\dms\testcancel.cs:line 105 at System.Windows.Forms.Form.WmClose(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DefMDIChildProc(IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.Form.DefWndProc(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WmSysCommand(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DefMDIChildProc(IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.Form.DefWndProc(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WmNcButtonDown(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at DMS.Main.AppMainEntry.Main() in D:\Documents and Settings\rick.hodder\My Documents\Visual Studio Projects\DMS\Main.cs:line 45