Update in database getting error
Application Type


When I update one of attribute then at that time I have getting this error like-

1 record couldn't be updated.

22 - There is already an open DataReader associated with this Command which must be closed first.

For more information, check the Service Center error logs.


Hi friend.

It's possible to be something related to the table indexes?

Can you send the error track from SC?

Kind regards


No I am not using Indexes .

Please find screenshot


I had this exact same error yesterday. I was trying to change a FK to 0 as well. Although zero is the null stardand value, even when the FK is not mandatory, the platform will validate and block the 0 value. So, basically you won't be able to change to zero inside this aggregate trick.

Yes, Same thing happened. I am trying to change the value of FK . 

You'll need to change to a valid FK or use another way to update it... a timer with an SQL query running when published should do the work.

Can you please share me example how can use it

Just set a timer to run when publish. Set a SQL UPDATE like this one bellow.

Be carreful with the conditions or the entire table will be updated.

If the FK is not mandatory it should work fine.

Ok. I will try this, if I am getting any issues, then I will let you know.

Hey there.

If this solution solved you issue, I would be glad if you mark as solution :)

Hi Purva,

There will be 2 scenario.

  1. You are trying to apply current row with existing identifier value
  2. Trying to apply existing identifier value for foreign key.

Refer below screenshots for better understanding.

Thanks, Aadhavan S


In  entity there is one FK value . and I want to set the value for FK .When I set value this error appeared. 


Hi Purva,

The FK value which you are setting is already exist in the database? because you should see the option of drop down like example below, if you already have data for it.

I have tried to set the FK key in my entity for which I don't have value in it then I got the same error.

can you make sure you have data with same Id in your FK entity and you trying to set the same Id?


Manish Jawla

Yes, Same Id I try to use there which is show in dropdown 

Hi Purva,

I hope you are doing well!!

you can take reference of below link,



Same error discussion has been happened in above links.

Kind Regards,

Ajit Kurane.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.