I have a detail grid, in which I change one of the values of a field that is in the primary key (no duplicate is created). When I do so I get the error
"Incorrect syntax near the keyword 'WHERE'."
EntitySpaces Version # 2007.0.0528.0
The code that triggers the message is the Save() method.
Code:
ultraGridUserCustLocations.UpdateData();
if (userCustomerLocationsCollection1.IsDirty)
{
userCustomerLocationsCollection1.Save();
} I can add & delete records in the same grid
If I use Watch and look at this variable
((EntitySpaces.Interfaces.esDynamicQuery)(userCustomerLocationsCollection1.Query)).es.LastQuery
I see this value
SELECT * FROM [UserCustomerLocations] WHERE ([UserId] = @UserId1 )
Any ideas? Need any more info.
Code:
Stack Trace
at EntitySpaces.Core.esEntityCollection.SaveToProviderInsertsUpdates(esSqlAccessType sqlAccessType)
at EntitySpaces.Core.esEntityCollection.SaveToProvider(esSqlAccessType sqlAccessType)
at EntitySpaces.Core.esEntityCollection.Save(esSqlAccessType sqlAccessType)
at EntitySpaces.Core.esEntityCollection.Save()
at Logistics.frmUsers.CheckUserCustLocationDataRow() in C:\Development\Customers\TRNJ\Logistics\Logistics\frmUsers.cs:line 174
at Logistics.frmUsers.ultraGridUserCustLocations_BeforeRowDeactivate(Object sender, CancelEventArgs e) in C:\Development\Customers\TRNJ\Logistics\Logistics\frmUsers.cs:line 125
at Infragistics.Win.UltraWinGrid.UltraGrid.OnBeforeRowDeactivate(CancelEventArgs e)
at Infragistics.Win.UltraWinGrid.UltraGrid.FireEvent(GridEventIds id, EventArgs e)
at Infragistics.Win.UltraWinGrid.UltraGrid.OnActiveRowCleared(Boolean update)
at Infragistics.Win.UltraWinGrid.UltraGridBase.SetActiveRow(UltraGridRow row, Boolean scrollIntoView)
at Infragistics.Win.UltraWinGrid.UltraGridCell.Activate()
at Infragistics.Win.UltraWinGrid.UltraGridCell.SetFocusAndActivate(Boolean byMouse, Boolean enterEditMode, Boolean byTabKey)
at Infragistics.Win.UltraWinGrid.UltraGridCell.SetFocusAndActivate(Boolean byMouse, Boolean enterEditMode)
at Infragistics.Win.UltraWinGrid.CellUIElementBase.OnEmbeddableElementMouseDown(Object sender, EmbeddableMouseDownEventArgs e)
at Infragistics.Win.UltraWinGrid.GridEmbeddableEditorOwnerInfoBase.OnEditorMouseDown(EmbeddableUIElementBase embeddableElem, EmbeddableMouseDownEventArgs e)
at Infragistics.Win.EmbeddableUIElementBase.RaiseMouseDownEvent(EmbeddableMouseDownEventArgs e)
at Infragistics.Win.EmbeddableUIElementBase.OnMouseDown(EmbeddableMouseDownEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement)
at Infragistics.Win.EditorWithTextUIElement.OnMouseDown(MouseEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement)
at Infragistics.Win.UIElement.OnMouseDown(MouseEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement)
at Infragistics.Win.TextUIElementBase.OnMouseDown(MouseEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement)
at Infragistics.Win.EditorWithTextDisplayTextUIElement.OnMouseDown(MouseEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement)
at Infragistics.Win.ControlUIElementBase.ProcessMouseDownHelper(Object sender, MouseEventArgs e)
at Infragistics.Win.ControlUIElementBase.ProcessMouseDown(Object sender, MouseEventArgs e)
at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
at Infragistics.Win.UltraControlBase.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.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)