|Title:||Possible bug with DataSet designer for Compact platform|
|Last Modified:||2012-01-25 18:28:12|
|Version Found In:||188.8.131.52|
I wrote this on forum, but then realized that System.Data.SQLite changned owner.
I think I stumbled upon strange bug with System.Data.SQL on Compact platform (Version 184.108.40.206 April 18, 2010).
Here is an example application: http://www.2shared.com/file/_uqZaa7_/dbtesstdbtestpda1.html
Erorr show up on TableAdapte.Update(). FormatException is raised with no aparent reason.
Here is code excerpt:
DataRow mRow = ((DataRowView)dm.bs_appconfig.Current).Row;
As you may see, there is no actual change in current row. BeginEdit() is used just to set row status so there is reason for Update() to work.
After I lost all reasonable ideas, I decided to try to reproduce problem in applciation compoiled for desktop platform. Bingo! There was no problem. Desktop apllication worked fine.
That lead thac problem couse is with SQLite DLL compiled to CF.
I also found out workaround - I changed INSERT SQL command originally created by Designer.
Original was like
UPDATE [mytable] SET [id] = @id, [title] = @title WHERE (([id] = @Original_id) AND ((@IsNull_title = 1 AND [title] IS NULL) OR ([title] = @Original_title))
I made it simple:
UPDATE [mytable] SET [id] = @id, [title] = @title WHERE [id] = @Original_id
That solved a problem with FormatException.
I hope this is sufficient information to help finding bug.
mistachkin added on 2011-10-11 05:34:21 UTC:
mistachkin added on 2011-11-13 21:53:56 UTC:
mistachkin added on 2012-01-25 18:28:12 UTC: