Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8270023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:25:52+00:00 2026-06-08T06:25:52+00:00

Store update, insert, or delete statement affected an unexpected number of rows (0). Entities

  • 0

Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. Refresh ObjectStateManager entries.

I just started learning entity and have done some playing with it in Winforms and now with Webforms. It was working fine for a few days and now I get the error when I try to update a field in the DataView. ‘AutoGenerateEditButton=”True” in the DV. The DV is wired to the EntityDataSource. A friend accessed the webform and edited one from a diff location and was the last time the edit/update worked.

This is the updating event in case that helps:

Sub dgv_RowUpdating(ByVal sender As Object, ByVal e As GridViewUpdateEventArgs) Handles dgv.RowUpdating
Try
  Dim row As GridViewRow = dgv.Rows(dgv.EditIndex)
  Dim list As DropDownList = CType(row.FindControl("ddlDoseType"), DropDownList)
  e.NewValues("DoseType") = list.SelectedValue
Catch ex As Exception
  MsgBox(ex.ToString)
End Try
End Sub

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:25:53+00:00Added an answer on June 8, 2026 at 6:25 am

    You can reproduce this error if you do the following

    • Client A reads a row with ID = 1
    • Client B deletes the row with ID = 1
    • Client A changes the contents of the row
    • Clinet A tries to save the changes

    Since the row with ID = 1 does not exist you get the error that was in your question.

    It does not look like the code you posted is causing the error, since that is the updating of the datagrid, not the saving of data to the database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Store update, insert, or delete statement affected an unexpected number of rows (0). Entities
I have a stored procedure which is called inside a trigger on Insert/Update/Delete. The
Can I find out when the last INSERT, UPDATE or DELETE statement was performed
My webapp needs to read, write (INSERT, UPDATE, DELETE), and execute stored procedures on
Say I have a stored procedure consisting of several separate SELECT, INSERT, UPDATE and
I have an app on the Store for which we’re readying an update. The
I have a list of users in local store that I need to update
I have mysql error with code 1451. Cannot delete or update a parent row:
I am well aware of SQL statements such as select, insert, update and delete.
I found a solution for people who get an exception: Store update, insert, or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.