Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot query sqlite_master or sqlite_temp_master tables #3

Open
bucweat opened this issue Aug 16, 2019 · 1 comment
Open

Cannot query sqlite_master or sqlite_temp_master tables #3

bucweat opened this issue Aug 16, 2019 · 1 comment

Comments

@bucweat
Copy link

bucweat commented Aug 16, 2019

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)

@bucweat
Copy link
Author

bucweat commented Aug 16, 2019

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant