1

How to get column names and its values in SQLite for windows runtime apps (Windows 8.1 apps).

In Android it can be done easily like the following code snippet:

...
Cursor cursor = database.rawQuery("select * from  Student");
String[] columnNames = cursor.getColumnNames();
...

I am using Sqlite-net library for my windows project. I'm following this article.

Kishor Bikram Oli
  • 1,748
  • 1
  • 22
  • 40
  • Possible duplicate of [How to get a list of column names](http://stackoverflow.com/questions/685206/how-to-get-a-list-of-column-names) and [Find SQLite Column Names in Empty Table](http://stackoverflow.com/q/928865/1889329). – IInspectable Jul 21 '16 at 17:39
  • Also relevant: [PRAGMA table_info](http://www.sqlite.org/pragma.html#pragma_table_info). – IInspectable Jul 21 '16 at 17:57
  • Show the function you're actually using to execute the query. – CL. Jul 22 '16 at 07:48
  • Hi CL, I'm using `await conn.ExecuteAsync(query);` from `conn= new SQLiteAsyncConnection(dbPath);` – Kishor Bikram Oli Jul 22 '16 at 09:39
  • How can this be duplicate ? He is asking to get both the column names and the values per column. Please answer the question. @everyone – Biswas Khayargoli Jul 22 '16 at 10:07
  • @BiswasKhayargoli-ITH: The OP already knows how to get the values. The query is in the question. They have difficulty querying the column names. And that is a duplicate of the question I linked to. – IInspectable Jul 23 '16 at 11:39

0 Answers0