Skip to content

Cannot query sqlite_master or sqlite_temp_master tables #3

Open

Description

@bucweat

Per the sqlite3 faq one can simulate the .tables command with a query. I've tried this using the following query in Access with this syntax

SELECT * FROM [ODBC;DSN=SQLite3 Datasource;Database=C:\temp\test.db3].[sqlite_master]

which does not work. Querying a normal table (e.g. replace sqlite_master tablename with one given in .tables) works fine, so I know the syntax with the connection string embedded is correct/working.

So is the SQLite3ODBC driver limited from performing queries on "special" tables?

(BTW, "special" table is what sqlite_master is called on the faq page)

Activity

  1. bucweat commented on Aug 16, 2019

    @bucweat
    Author

    Some additional info: running from a vbscript using ADODB connection object works:

    Set objConn = CreateObject("ADODB.Connection")
    objConn.Open "DRIVER=SQLite3 ODBC Driver;Database=" & dbSqlite3 & ";"
    dim oRs: set oRs = objConn.execute("select name from sqlite_master where type = 'table'")

    oRs will contain recordset with name field containing tables in the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions