I have an SQLite table that I want to get multiple columns at once. I use a query similar to this to this one to get the data from the table:
"SELECT LastName, FirstName, Age, Birthday FROM table1 ORDER BY LastName"
I would assume that this gets all of the relevant data from the table but I don't know how to properly extract all of it from the query in C#. I use
SQLiteDataReader sqldr;
while (sqldr.Read())
{
Console.WriteLine(sqldr.GetString(0));
}
to print out the data but this only prints out the data from the LastName column. How would I go about printing out the rest of the data from the query? I tried incrementing the value inside of GetString(); but that resulted in a System.IndexOutOfRangeException in System.Data.SQLite.dll
Any suggestions would be greatly appreciated. Thanks!