Hi and sorry for not answering earlier,
Just tried one more time with another clean build of my app and a fresh new download of the 1.0.47.2 version but I still can't figure what I would miss that would give me different results from your tests. Here is the query used to issue the SELECT statement and the corresponding SQLite CREATE TABLE queries stored in the sqlite master table.
CREATE TABLE Table_1 (Id INTEGER PRIMARY KEY, Field_57 TEXT, Field_3 TEXT, Field_69 TEXT, Field_24 TEXT, Field_25 INTEGER, Field_85 TEXT, Field_29 INTEGER, Field_30 TEXT, Field_31 TEXT, Field_116 TEXT, Field_84 TEXT, Field_117 TEXT, UNIQUE (Field_57));
CREATE TABLE Table_2 (Id INTEGER PRIMARY KEY, Field_4 TEXT, Field_120 TEXT, Field_10 TEXT, Field_11 TEXT, Field_12 TEXT, Field_21 TEXT, Field_22 TEXT, Field_33 TEXT, Field_23 INTEGER, Field_34 TEXT, UNIQUE (Field_4));
CREATE TABLE Sync_1 (Id INTEGER, Id_Global INTEGER, Status INTEGER, PRIMARY KEY(Id, Id_Global));
SELECT DISTINCT t1.Id, t1.Field_69, t1.Field_84, t1.Field_3, t1.Field_25, t2.Field_120, t1.Field_117 FROM Sync_1 s1, Table_1 t1, Table_2 t2 LEFT JOIN Table_5 t5 ON t2.Field_4 = t5.Field_7 AND t5.Field_37 = 1 WHERE t1.Field_3 = t2.Field_4 AND s1.Id = t1.Id AND (t1.Field_69 = 'lact_confirmed' OR t1.Field_69 = 'lact_planned') ORDER BY t1.Field_25 ASC;
(Don't ask about the column and table names, they are auto-generated).
Just to ensure we're talking about the same things, I'm working with a Windows Mobile 5.0 device using the Compact Framework (GAC 2.0.7045.0, 1.0.4292.2) with the 1.0.47.2 System.Data.SQLite.dll version and the following snippet of code reproduces the problem :
SQLiteCommand
cmd = connection.CreateCommand();
cmd.CommantText = "..."; // replace with the above query
SQLiteDataReader r = cmd.ExecuteReader();
DataTable dataTable = new DataTable("Table_1");
dataTable.BeginLoadData();
dataTable.Load(r);
dataTable.EndLoadData();
reader.Close();
cmd.Dispose();
You then get a DataTable which columns are named t1.Id, t1.Field_69, t1.Field_84 and so on.
Later edit: you know what? While rereading I felt something strange with my DataTable declaration (the table name mapping) but it does work with the 1.0.46.0 version.
Ruslan, I fear I didn't understand your suggestion, I didn't met any problems with letter case for now. Sorry to ask, but what do you mean with that case sensitive thing and the column names?