Error when use GUID field as browse search field


Author
Message
Chan
Chan
Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I found that this issue has been fixed in version 1.6.1.

I specified {00000000-0000-0000-0000-000000000000} in Top Most Value under Combo-General.

After I select item from combobox and click search, I hit error error below. Any ideas?



InvalidCastException

Conversion from type 'Guid' to type 'String' is not valid.



Source : Microsoft.VisualBasic



Stack Trace:

at Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value)

at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow.BuildWhereElement(SearchFieldItem SearchField)

at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow.BuildSearchWhereClause()

at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow.ExecuteSearch()

at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow.tsiSearch_Click(Object sender, EventArgs e)

at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)

at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)

at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)

at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)

at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)

at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)

at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

at System.Windows.Forms.ToolStrip.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)

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
The processing of the where element for GUID was assuming that the type could be cast or converted to a Guid, so I changed it so that it would use the Guid constructor and pass over the value.ToString() (the Guid constructor will then parse the value back into a valid Guid).  So, it should fix the problem you're having.  However, if you need the fix before then, then you can change your source code:

BrowseDialogwindow.vb line 2207:

loFieldValue.Add(New Guid(_CurrentValue.ToString()))

Instead of the:

loFieldValue.Add(CType(_CurrentValue, Guid))


Chan
Chan
Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Thank you answer.

When would next SF release? I am using SF 1.6.1 (posted at forum) which doesn't have source code. Therefore, I am not able to change my source code.
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
I am not positive when the next release will be... we are currently getting our finishing out the rest of the posted bugs and getting the install ready for VS2008 and 64-bit.
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