We have reproduced the problem. This problem is connected with the specifity of SQL Server Compact 4 work and not with SDAC. Also note that the '&' symbol doesn't cause this problem. For example, you can try executing the following SQL code:
Code: Select all
UPDATE tblArtist_x_Detail SET Artist_ID = 200 WHERE artist = 'Dave Stewart The Spiritual Cowboys'
, and the same error will occur.
We don't know why SQL Server Compact 4 doesn't work with such queries. You can solve the problem by using parameters. For example, in your sample you can use the following code without any errors:
Code: Select all
UniSQL1.SQL.Text := 'UPDATE tblArtist_x_Detail SET Artist_ID = :Artist_ID WHERE artist = :artist';
UniSQL1.ParamByName('Artist_ID').AsInteger := 200;
UniSQL1.ParamByName('artist').AsString := 'Dave Stewart & The Spiritual Cowboys';
UniSQL1.Execute;
Also you can try to recreate your database and tables. I had created a new database with the new tblArtist_x_Detail table and successfully executed queries that cause the problem with your database.