Quantcast
Channel: SQL Server Compact Forum
Viewing all articles
Browse latest Browse all 193

Problems with SqlCeDataAdapter and unique nullable columns

$
0
0

Hi,

calling Update on an SqlCeDataAdapter causes problems if the table contains a unique nullable column. The problem occurs because SqlCeParameter discards changes to its SourceColumnNullMapping property which is set by DbCommandBuilder. This leads to wrong behavior within the DbDataAdapter which can cause various exceptions depending on the column type (for example a format exception when the column is of a string type and the row to commit has a value for this cell which can't be converted to Int32). For details on this property, why it is needed and how it affects the SQL statement see this MSDN article.

Why doesn't the SqlCeParameter allow setting its SourceColumnNullMapping? Is this a bug? There seems to be no workaround without changing the data model.

I'm really looking forward to any answers!


Viewing all articles
Browse latest Browse all 193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>