Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

We Value Your Feedback!
Could you please spare a few minutes to share your thoughts on Cloud Connected vs On-Premise Services. Your feedback can help us shape the future of services.
Learn more about the survey or Click here to Launch the survey
Schneider Electric Services Innovation Team!

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

SmartConnector Forum

Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • EcoStruxure Building
  • SmartConnector
  • SmartConnector Forum
  • Store update, insert, or delete statement affected an unexpected number of rows (0)
Options
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
JeffBowman
Sisko JeffBowman Sisko
164
ardak
ardak Schneider Alumni (Retired)
34
sesa180908_brid
Commander sesa180908_brid Commander
34
mike_meirovitz
Commander mike_meirovitz
21
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to SmartConnector Forum
Solved
mike_meirovitz
Commander mike_meirovitz
Commander

Posted: ‎2022-09-06 09:27 PM

0 Likes
6
4472
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2022-09-06 09:27 PM

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

Hi,

 

Our SmartConnector extension is receiving an exception. It looks to me as a connection problem with SQL Server. See the error message below.

Any idea what may cause this issue? How can it be prevented?

 

2022-09-06 16:29:12.018 [14] ERROR, UpdateProcessor:Execute_Subclass, Long loop error 'Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions.'

 

Thank you.

 

Michael

 

 

Tags (1)
  • Tags:
  • english
Reply
  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
mike_meirovitz
Commander mike_meirovitz
Commander

Posted: ‎2022-09-09 12:34 AM

0 Likes
2
4371
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2022-09-09 12:34 AM

Hi Erwin,

 

Yes, we are using EWS server.

SQL Server on the same computer where SmartConnector is running.

We do have 2 processors (Setup and Update), however the setup processor was completed before the update processor has started. So in this case it is just the Update processor.

We have many installations of this extension, the problem is just with a specific installation where the EWS server has many values (~17,000).

 

I have attached the SQL server log file where you can see these errors below. It looks as a SmartConnector to SQL server issue.

Can you please involve SmartConnector R&D so they can assist?

 

1. 

Line 657: 07/07/2022 22:12:51,spid61,Unknown,Service Broker needs to access the master key in the database 'SmartConnector.Service'. Error code:32. The master key has to exist and the service master key encryption is required.
Line 658: 07/07/2022 22:12:51,spid61,Unknown,Error: 28054<c/> Severity: 11<c/> State: 1.
Line 662: 07/04/2022 16:15:50,spid61,Unknown,Service Broker needs to access the master key in the database 'SmartConnector.Service'. Error code:32. The master key has to exist and the service master key encryption is required.
Line 663: 07/04/2022 16:15:50,spid61,Unknown,Error: 28054<c/> Severity: 11<c/> State: 1.
Line 666: 07/04/2022 14:59:06,spid61,Unknown,Service Broker needs to access the master key in the database 'SmartConnector.Service'. Error code:32. The master key has to exist and the service master key encryption is required.
Line 667: 07/04/2022 14:59:06,spid61,Unknown,Error: 28054<c/> Severity: 11<c/> State: 1.
Line 672: 07/04/2022 11:42:48,spid61,Unknown,Service Broker needs to access the master key in the database 'SmartConnector.Service'. Error code:32. The master key has to exist and the service master key encryption is required.
Line 673: 07/04/2022 11:42:48,spid61,Unknown,Error: 28054<c/> Severity: 11<c/> State: 1.

 

 

2.

05/06/2022 09:25:21,spid14s,Unknown,0 transactions rolled back in database 'SmartConnector.Service' (5:0). This is an informational message only. No user action is required.
Line 962: 05/06/2022 09:25:21,spid14s,Unknown,360 transactions rolled forward in database 'SmartConnector.Service' (5:0). This is an informational message only. No user action is required.
Line 968: 05/06/2022 09:25:21,spid14s,Unknown,Starting up database 'SmartConnector.Service'.

 

Thank you.

 

Michael

See Answer In Context

Attachments
LOG_SQL.log
Tags (1)
  • Tags:
  • english
Reply
Replies 6
Erwin-vd-Zwart
Sisko Erwin-vd-Zwart Sisko
Sisko

Posted: ‎2022-09-06 10:21 PM . Last Modified: ‎2022-09-06 10:27 PM

0 Likes
4
4464
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2022-09-06 10:21 PM

Is the SQL db running on the same machine as the SC framework?


Are you using a EWS server in the framewok?


When reading the error message i get the idea that 2 processes are using the same data source and one process change them where the second process is not aware of it.

 

Do you run code that deletes entries in the data adapter? 

Adding DataAdapter.CreateDatabaseContext(); before executing the code that causes the error might help as it reloads the data adapter with the actual data in the SQL DB

Tags (1)
  • Tags:
  • english
Reply
mike_meirovitz
Commander mike_meirovitz
Commander

Posted: ‎2022-09-07 11:59 PM

0 Likes
0
4395
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2022-09-07 11:59 PM

Hi Erwin,

 

Thank you for your answer. Yes, SQL Server running on the same computer where SmartConnector is running.

 

We will check your recommendations.

 

Mike

Tags (1)
  • Tags:
  • english
Reply
mike_meirovitz
Commander mike_meirovitz
Commander

Posted: ‎2022-09-09 12:34 AM

0 Likes
2
4372
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2022-09-09 12:34 AM

Hi Erwin,

 

Yes, we are using EWS server.

SQL Server on the same computer where SmartConnector is running.

We do have 2 processors (Setup and Update), however the setup processor was completed before the update processor has started. So in this case it is just the Update processor.

We have many installations of this extension, the problem is just with a specific installation where the EWS server has many values (~17,000).

 

I have attached the SQL server log file where you can see these errors below. It looks as a SmartConnector to SQL server issue.

Can you please involve SmartConnector R&D so they can assist?

 

1. 

Line 657: 07/07/2022 22:12:51,spid61,Unknown,Service Broker needs to access the master key in the database 'SmartConnector.Service'. Error code:32. The master key has to exist and the service master key encryption is required.
Line 658: 07/07/2022 22:12:51,spid61,Unknown,Error: 28054<c/> Severity: 11<c/> State: 1.
Line 662: 07/04/2022 16:15:50,spid61,Unknown,Service Broker needs to access the master key in the database 'SmartConnector.Service'. Error code:32. The master key has to exist and the service master key encryption is required.
Line 663: 07/04/2022 16:15:50,spid61,Unknown,Error: 28054<c/> Severity: 11<c/> State: 1.
Line 666: 07/04/2022 14:59:06,spid61,Unknown,Service Broker needs to access the master key in the database 'SmartConnector.Service'. Error code:32. The master key has to exist and the service master key encryption is required.
Line 667: 07/04/2022 14:59:06,spid61,Unknown,Error: 28054<c/> Severity: 11<c/> State: 1.
Line 672: 07/04/2022 11:42:48,spid61,Unknown,Service Broker needs to access the master key in the database 'SmartConnector.Service'. Error code:32. The master key has to exist and the service master key encryption is required.
Line 673: 07/04/2022 11:42:48,spid61,Unknown,Error: 28054<c/> Severity: 11<c/> State: 1.

 

 

2.

05/06/2022 09:25:21,spid14s,Unknown,0 transactions rolled back in database 'SmartConnector.Service' (5:0). This is an informational message only. No user action is required.
Line 962: 05/06/2022 09:25:21,spid14s,Unknown,360 transactions rolled forward in database 'SmartConnector.Service' (5:0). This is an informational message only. No user action is required.
Line 968: 05/06/2022 09:25:21,spid14s,Unknown,Starting up database 'SmartConnector.Service'.

 

Thank you.

 

Michael

Attachments
LOG_SQL.log
Tags (1)
  • Tags:
  • english
Reply
Horacio1
Lieutenant JG Horacio1 Lieutenant JG
Lieutenant JG

Posted: ‎2022-09-16 01:49 PM

0 Likes
1
4241
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2022-09-16 01:49 PM

Hello,

Maybe they just need to create the master key in the data base as the error says:

 

Service Broker needs to access the master key in the database 'SmartConnector.Service'. Error code:32. The master key has to exist and the service master key encryption is required.

 

This link might help:

https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/create-a-database-mast...

 

Looking forward to the solution.

 

Regards from Chile.

HSU

Tags (1)
  • Tags:
  • english
Reply
mike_meirovitz
Commander mike_meirovitz
Commander

Posted: ‎2022-09-21 07:25 PM

0 Likes
0
4160
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2022-09-21 07:25 PM

Hi HSU,

 

Thank you for your answer. I don't think that we are allowed to change anything in the SmartConnector Database. We just use SmartConnector APIs. If there is a problem with the SmartConnector database, the fix should be done by Schneider Electric, not by us.

 

Thank you.

 

Regards,

 

Mike  

Tags (1)
  • Tags:
  • english
Reply
mike_meirovitz
Commander mike_meirovitz
Commander

Posted: ‎2022-10-09 03:16 AM

0 Likes
0
4109
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2022-10-09 03:16 AM

Hi,

Please see the relevant part of our SmartConnector processor code below.

 

DataAdapter.CommitChanges();
DataAdapter.AutoCommit = true;

in this case, the DataAdapter is doing something in background which we don't when it ends. 

Then if we call following commands before this background task ends it causes the error,
dataAdapter.DeleteSubscription(ewsSubscriptions);
dataAdapter.CommitChanges();
dataAdapter.AutoCommit = true;


We must know when dataAdapter is finished and ready for new CommitChanges.

I appreciate your support.

Thank you.

Mike

Tags (1)
  • Tags:
  • english
Reply
Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of