/// <summary> /// Returns a dataset of each distinct invoice number by store number /// </summary> /// <returns>Dataset of distinct invoice numbers</returns> public DataSet GetUniqueInvoices(string storeNo) { //Get all invoice numbers if store number is * if (storeNo == "*") { this.FillDataSet(this.GetCurrentDataSet(), "SELECT DISTINCT InvoiceNo from Invoice", "InvoiceList"); } else { IDataParameter @StoreNo = this.CreateParameter("@StoreNo", storeNo); this.FillDataSet(this.GetCurrentDataSet(), "SELECT InvoiceNo FROM Invoice WHERE StoreNo = @StoreNo", "InvoiceList"); } return this.GetCurrentDataSet(); }Here is the complete stack trace:
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) at OakLeaf.MM.Main.Data.mmDataAccessOleDb.FillDataSet(DataSet ds, IDbDataAdapter dbAdapter, String tableName, Boolean clearOnFill) at OakLeaf.MM.Main.Data.mmDataAccessOleDb.FillDataSet(DataSet ds, IDbCommand command, String tableName, Boolean clearOnFill) at OakLeaf.MM.Main.Data.mmDataAccessOleDb.FillDataSet(DataSet ds, String command, String tableName, CommandType cmdType, IDbDataParameter[] dataParms, Boolean clearOnFill) at OakLeaf.MM.Main.Business.mmBusinessObject.FillDataSet(DataSet ds, String command, String tableName, String databaseKey, CommandType cmdType, IDbDataParameter[] dataParams) at OakLeaf.MM.Main.Business.mmBusinessObject.FillDataSet(DataSet ds, String command, String tableName, String databaseKey, IDbDataParameter[] dataParams) at OakLeaf.MM.Main.Business.mmBusinessObject.FillDataSet(DataSet ds, String command, String tableName, String databaseKey) at OakLeaf.MM.Main.Business.mmBusinessObject.FillDataSet(DataSet ds, String command, String tableName) at ESK.DataUploadSystem.Business.Invoice.GetUniqueInvoices(String storeNo) in C:\deve\ESK Invoice Upload System Business\Invoice.cs:line 116 at ESK.InvoiceUploadSystem.Windows.ViewInvoices.ddlStoreNo_SelectedIndexChanged(Object sender, EventArgs e) in C:\deve\ESK Invoice Upload System Windows\ViewInvoices.cs:line 47 at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e) at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m) at System.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m) at System.Windows.Forms.Control.WmCommand(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.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.NativeWindow.DefWndProc(Message& m) at System.Windows.Forms.Control.DefWndProc(Message& m) at System.Windows.Forms.Control.WmCommand(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at ESK.InvoiceUploadSystem.Windows.Main.AppMainEntry.Main() in C:\deve\ESK Invoice Upload System Windows\Main.cs:line 45Thanks for any help you can offer.