GROUP BY

IMPORTANT NOTE ABOUT GROUP BY The fields you get returned are not necessarily the fields from the exact same row in a collection of group by rows.  This is relevant when you for instance want to get the first occurrence of something within the group by, i.e. the row with the earliest datetime value (which wasn't […]

Read More

SELECT Queries

SELECT Query Example Command1->CommandText = "SELECT * FROM MyTable WHERE SomeColumnName >= @StartValue AND SomeColumnName <= @EndValue"; Command1->Parameters->AddWithValue("@StartValue", 14); Command1->Parameters->AddWithValue("@EndValue", 28); System::Data::SQLite::SQLiteDataReader ^Reader1 = Command1->ExecuteReader(); { while (Reader1->Read()) { MyVariable = Convert::ToString(Reader1["SomeColumnName1"]); MyVariable2 = Convert::ToInt32(Reader1["SomeColumnName2"]); } } Reader1->Close(); //Bugfix to workaround sqlite "database is locked" issue when updating after a read while (!Reader1->IsClosed) System::Threading::Thread::Sleep(1); //mS […]

Read More