System.Data.SQLite
View Ticket
Not logged in
Ticket UUID: 6f00b44ccca217d66cc660aac2ea36083b37e2bf
Title: Possible bug with DataSet designer for Compact platform
Status: Closed Type: Code_Defect
Severity: Important Priority: Medium
Subsystem: Db_Type_Conversion Resolution: Duplicate
Last Modified: 2012-01-25 18:28:12
Version Found In: 1.0.66.0
Description:
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 1.0.66.0 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;
mRow.BeginEdit();
dm.bs_appconfig.EndEdit();
dm.appconfigTableAdapter.Update(dm.ds.appconfig);

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:
The SQL statement in question is generated by the DbCommandBuilder class in the .NET Framework. I'm not sure where the FormatException is coming from.


mistachkin added on 2011-11-13 21:53:56 UTC:
Support for the compact framework will be ready for release 78 (i.e. the release after the upcoming one).


mistachkin added on 2012-01-25 18:28:12 UTC:
See ticket [343d392b51].