SQLite Forum

DESC keyword is ignored
Login
Hi,

I created a sqlite file with a C# code, following an example from the internet. The code that creates the file is the following: 

...
SQLiteConnection.CreateFile(db_path);
dbconnection = new SQLiteConnection("Data Source=" + db_path + ";Version=3;");
...

Then, the table 'Mesures' is created, and some data entries are saved in the database.

In another part of the code, I need to get the latest 10 entries where attribute NumLot=Lot1, so I execute the following command:

SELECT * FROM Mesures WHERE NumLot IS 'lot1' ORDER BY 'Id' DESC LIMIT 10

My problem is that the 'DESC' keyword is ignored, and I always get the first 10 entries instead of the 10 latest ones. 

Could you help me find the problem?

P.S.: I installed System.Data.SQLite version v1.0.115.5 with NuGet.