Reputation: 11
I got this error when Add data to database (on windows phone app) at this line :
if (concac.DatabaseExists())
{
concac.Cacs.InsertOnSubmit(fullname);
concac.SubmitChanges();
}
And this is the error:
{System.Data.SqlServerCe.SqlCeException: Permission denied.
at System.Data.SqlServerCe.SqlCeDataReader.ProcessResults(Int32 hr)
at System.Data.SqlServerCe.SqlCeResultSet.InternalInsert(Boolean fMoveTo, Object sender, SqlCeUpdatableRecord record)
at System.Data.SqlServerCe.SqlCeResultSet.Insert(SqlCeUpdatableRecord record, DbInsertOptions options)
at System.Data.Linq.ChangeDirector.StandardChangeDirector.DoResultSetInsert(TrackedObject item)
at System.Data.Linq.ChangeDirector.StandardChangeDirector.Insert(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 Member.DBHelper.AddName(Cac1 fullname)
at Member.Add.appBarOkButton_Click(Object sender, EventArgs e)
at Microsoft.Phone.Shell.ApplicationBarItemContainer.FireEventHandler(EventHandler handler, Object sender, EventArgs args)
at Microsoft.Phone.Shell.ApplicationBarIconButtonContainer.ClickEvent()
at Microsoft.Phone.Shell.ApplicationBar.OnCommand(UInt32 idCommand, Boolean isButton)
at Microsoft.Phone.Shell.Interop.NativeCallbackInteropWrapper.OnCommand(UInt32 idCommand, Boolean isButton)}
Upvotes: 0
Views: 156
Reputation: 5119
It sounds to me like you need to check permissions on your DB. As an example, in MSSQL, you have to grant permissions (per user) when using a SELECT or UPDATE statement.
Upvotes: 1