Reputation: 139
When not using the nvarchar and replacing with another string i.e.'test' I get the expected replacing results. I am attempting to insert a carriage return
private void reformatData(SqlCeConnection conn)
{
try
{
SqlCeCommand comm = new SqlCeCommand("UPDATE database " + "SET column = replace(MoodLog, '[ret]', nvarchar(13));", conn);
comm.ExecuteNonQuery();
}
catch (SqlCeException ex)
{
MessageBox.Show(ex.ToString());
}
}
Upvotes: 0
Views: 267
Reputation: 41779
Use the nchar function, no nvarchar function with SQL Server Compact:
http://technet.microsoft.com/en-us/library/ms174852.aspx
Upvotes: 1