Cannot open SQLiteDatabase

Thanks, but which method given that I need the data from one row? There is afaik no method that would find row x, or is there?

Your original sql, “SELECT a, b , c FROM Table”, does not specify an order of the rows. AIUI, SQL databases have no concept of inherent order of the rows, so if you want the rows in a particular order, you have to have an ORDER BY clause in your SELECT. Otherwise the database engine is free to return the rows in any order it likes. Anyway, if you want row x you better have a column (id, say) with numbers increasing from 1 to n, and then specify that column in your sql:

SELECT a, b, c FROM table WHERE id=x

Thanks again. So it is preferable to retrieve a single row by performing a new SQL search. Got it!

:slightly_smiling_face: (Bed time here, sorry)

This sql will give you all rows where id=x, so if you want that to be a single row you need to make sure id is unique (all rows having different values). The SELECT above gives you rows with three columns (a, b, and c). If you do:

then you get the content of the first column as defined in your CREATE TABLE statement, which presumably is column a.

Me, to get column a I would always do:

then it doesn’t matter in which order the columns are defined in the CREATE TABLE statement.

Tim,
fine. I will try this too. (Just wondering why this is not mentioned in guides etc.).

Well it’s mentioned in the doc for rowset.Column and rowset.ColumnAt, isn’t it?

Not usually. It is preferable to reduce the number of database calls for performance reasons. That said, a RowSet is not suited for random access. You usually loop through each row and call MoveToNextRow. You could transfer the contents of the rowset to some other storage depending on your needs.

That is by design. When you call SelectSQL, the rowset returned is positioned at the first row. As was mentioned earlier, ColumnAt returns the value of the column in the current row (default is the first row). There is no way to randomly select a row from the rowset, you have to process them one by one.

I usually transfer the relevant information from the rowset to some other storage mechanism (array, dictionary, class instances, etc.) and dispose of the rowset as quickly as possible. As a storage container, it is quite limited. It exists primarily to transfer data from the database to your app.

Tim
Got it. I may try with an array. Just for the big 130MB-db (60 columns x 130.000 data rows), maybe a SelectSQL call is more economical than a huge array.
I have no dictionary knowledge so far.
Thanks again!