APPLIES TO


Email Signature Manager version 5.x

Email Signature Manager version 6.x


SUMMARY


This article describes how to resolve a persistent error message that occurs when saving data in Email Signature Manager when using a SQL Server database.


SYMPTOMS


When you attempt to save an object through Email Signature Manager (for example, saving changes to a signature) that is connected to a SQL Server database, an error with the following description is raised:


Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.


The detail of the operation is similar to the following:


Operation: Symprex.DataAccessShared.DataChangeManager.CommitChanges()

 

Exception #1 (System.InvalidOperationException): Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.

   at System.Data.Common.DbDataAdapter.UpdatingRowStatusErrors(RowUpdatingEventArgs rowUpdatedEvent, DataRow dataRow)

   at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)

   at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)

   at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable)

   at System.Data.Common.DbDataAdapter.Update(DataSet dataSet)

   at (Object , DataSet )

   at <obfuscated stack trace>


CAUSE


This problem is caused by missing primary key information in one or more tables in the SQL Server database and occurs in one of the following situations:


  • You have imported the settings.mdb database directly into SQL Server using SQL Management Studio.
  • You have moved the database from one SQL Server to another without migrating the full database schema.


RESOLUTION


The correct way to move data from one database to another (irrespective of the type of the database) is to the Import function. Full details are can be found as follows:



STATUS


The problem is resolved as described above.