Browse Dialog error


Author
Message
Andria Jensen
Andria Jensen
StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)
Group: Forum Members
Posts: 336, Visits: 497
Ok, so I'm trying to do a Browse Dialog for a pretty large BO and I have everything set up according to how I thought it was supposed to be.  But, I'm getting an error...And I'm not even sure what it's pointing me to, so I'm just posting a screenshot and seeing if you can tell me anything.  I have a BO with data in it, and I'm using Me.AccountsBrowseDialog.ShowDialog() to pop up the form.  I even narrowed it down to only use one search field to make sure it wasn't data related.  Let me know if you have any ideas.
StrataFrame Team
S
StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Is that a message box that you're showing that intercepts the unhandled exception?  Or is it being shown from somewhere within the bowels of the application?

I'm not sure from the message description what's throwing it, so, if you can get the stack trace from the exception, it would be greatly helpful.

Andria Jensen
Andria Jensen
StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)
Group: Forum Members
Posts: 336, Visits: 497
There you go...I meant to post that, but I forgot.  Looks like it's in the CreateDataRowItem

8/14/2006 4:24:11 PM
Source: mscorlib
Message: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
Stack:    at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
   at System.String.Format(IFormatProvider provider, String format, Object[] args)
   at System.String.Format(String format, Object[] args)
   at MicroFour.StrataFrame.UI.Windows.Forms.DevEx.BrowseDialogWindow.CreateDataRowItem(DataTable CurrentTable)
   at MicroFour.StrataFrame.UI.Windows.Forms.DevEx.BrowseDialogWindow.LoadBrowseResults()
   at MicroFour.StrataFrame.UI.Windows.Forms.DevEx.BrowseDialogWindow.ExecuteSearch()
   at MicroFour.StrataFrame.UI.Windows.Forms.DevEx.BrowseDialogWindow.cmdSearch_ItemClick(Object sender, ItemClickEventArgs e)
   at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)
   at DevExpress.XtraBars.BarBaseButtonItem.OnClick(BarItemLink link)
   at DevExpress.XtraBars.BarItemLink.OnLinkClick()
   at DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)
   at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
   at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at DevExpress.XtraBars.Controls.DockedBarControl.WndProc(Message& msg)
   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)

Andria Jensen
Andria Jensen
StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)
Group: Forum Members
Posts: 336, Visits: 497
Oh, and I DO get records back if I take the SQL out of the Debug log and run it in query analyzer.  So it looks like the SQL it's generating is correct.
Andria Jensen
Andria Jensen
StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)
Group: Forum Members
Posts: 336, Visits: 497
And I didn't answer your question.  Yes, it's a message box I create that handles the UnhandledException.  It shows just the error that would be on the red error message, but not the stack trace.  I print it out to a log file, which is where I got what I attached above.
Andria Jensen
Andria Jensen
StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)StrataFrame User (424 reputation)
Group: Forum Members
Posts: 336, Visits: 497
Ok, Ok....I know what it is.  When I was setting the format for the result values columns I had a typo and put the parameters as {1} and {2} instead of {0} and {1}...So I guess that error means that it couldn't find {2} since I hadn't specified a third parameter.
StrataFrame Team
S
StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Hehe, awesome, you figured it out Smile  Yes, it will give you an argument out of range exception when it tries to format an entry that isn't there.  There are certain format methods that will just print out the "{2}" rather than give you an exception, but apparently, that one just throws the exception.  I'm glad you figured it out.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search