WP7 SQL CE query error analysis

Error analysis of the query. [ Token line number = 3,Token line offset = 1,Token in error = WHERE ]
The following code

private RelayCommand<Model_Group> _editGroupCommand;
public RelayCommand<Model_Group> EditGroupCommand
return _editGroupCommand ?? (_editGroupCommand = new RelayCommand<Model_Group>(p =>
var db = ViewModelLocator.Instance.Database;
var oldGroup = (from g in db.Groups
where g.GroupID==p.GroupID
select g).FirstOrDefault();
if (oldGroup!=null)
oldGroup.GroupName = p.GroupName;

Error message

Untreated System.Data.SqlServerCe.SqlCeException
Error querying Message= analysis. [ Token line number = 3,Token line offset = 1,Token in error = WHERE ]
Source=SQL Server Compact ADO.NET Data Provider
at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr)
at System.Data.SqlServerCe.SqlCeCommand.CompileQueryPlan()
at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options)
at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery()
at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult, Boolean isCompiledQuery)
at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries, Boolean isCompiledQuery)
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
at System.Data.Linq.ChangeDirector.StandardChangeDirector.DynamicUpdate(TrackedObject item)
at System.Data.Linq.ChangeDirector.StandardChangeDirector.Update(TrackedObject item)
at System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode)
at System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
at System.Data.Linq.DataContext.SubmitChanges()
at MaxCard.ViewModels.CardCollectionViewModel.<get_EditGroupCommand>b__24(Model_Group p)
at GalaSoft.MvvmLight.Command.RelayCommand`1.Execute(Object parameter)
at MaxCard.ViewModels.CardCollectionViewModel.input_Completed(Object sender, PopUpEventArgs`2 e)
at Coding4Fun.Phone.Controls.PopUp`2.OnCompleted(PopUpEventArgs`2 result)
at Coding4Fun.Phone.Controls.UserPrompt.ok_Click(Object sender, RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

Seek expert advice

Started by Justin at December 17, 2016 - 10:31 PM

where g.GroupID==p.GroupID
Look at this sentence has no results?

Posted by Owen at December 27, 2016 - 10:39 PM

The reply to 2012-05-09 16:53:35 was a moderator to delete

Posted by Elliott at January 04, 2017 - 1:14 AM

A result, oldGroup value can be found, the program execution to db.SubmitChanges (); the error occurred

Posted by Justin at January 10, 2017 - 2:12 AM

Online etc.! Seek expert advice.

Posted by Justin at January 11, 2017 - 11:16 PM

Does this sink. Artificial top..! Artificial top! Artificial top!

Posted by Justin at January 12, 2017 - 2:52 AM

The SQL statement is not supported

Posted by Ashley at January 14, 2017 - 12:15 AM