View Ticket
Not logged in
Ticket Hash: 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:
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 April 18, 2010).

Here is an example application:

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:
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].