Reputation: 14281
The same thing as Find SQLite Column Names in Empty Table with the exception that I have a view that is part of an attached database. Because the database is attached the PRAGMA table_info( your_table_name );
solution doesnt work. Furthermore, trying to parse the query string is also ridiculous because it is a view query.
Upvotes: 1
Views: 178
Reputation: 52621
PRAGMA AttachedDbName.table_info(your_table_name)
Another technique: prepare a statement of the form select * from your_table_name;
, then use sqlite3_column_count
, sqlite3_column_name
et al. You don't need to actually run the statement, just prepare it.
Upvotes: 3