Sorry, the above code will not work as expected. You have to call NextRow before accessing the columns of a retrieved row. In the wxSQLite3 documentation you will find for method wxSQLite3ResultSet::NextRow the description

Advances the cursor to the next row. On creation of the result set the cursor is positioned BEFORE the first row, i.e. the first call to this method makes the first row available for processing.