Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Failing to connect and select from sqlite3

Hi!  I'm running windows Vista SP2 32bit and using the sqlite driver located here:  http://www.ch-werner.de/sqliteodbc/  When I push "connect" in the script editor, choose sqlite3 database, and browse to my database--it seems to work fine. But I only get the text "ODBC CONNECT TO [SQLite3 Datasource];" in the script, not the full path to the file. If I then push "select", I can see the database tables and columns. But, even a simple SQL Select * FROM Documents fails with "no such table Documents".  What does a correct sqlite CONNECT and SELECT combination look like?  thank you, -david

1 Solution

Accepted Solutions
rbecher
MVP
MVP

Maybe like this:

ODBC CONNECT TO [SQLite3 Datasource;Database=D:\Users\davideps\Desktop\test.sqlite;];

- Ralf

Astrato.io Head of R&D

View solution in original post

4 Replies
rbecher
MVP
MVP

Hi David,

I would suggest to replace [SQLite3 Datasource] with the full path of the db. I presume this is a missing feature in the ODBC driver.

Btw. there is also a JDBC driver:

http://www.zentus.com/sqlitejdbc/

Which could be used with our QlikView JDBC Connector:

http://community.qlik.com/docs/DOC-2438

- Ralf

Astrato.io Head of R&D
Not applicable
Author

Thank you Ralph.

What would a correct ODBC Connect statement look like for a sqlite driver? For example, when I put this in the script:

ODBC CONNECT TO “D:\Users\davideps\Desktop\test.sqlite”

I get the error “SQL##f - SqlState: IM010, ErrorCode: 0, ErrorMsg: [ODBC Driver Manager] Data source name too long” when trying to reload the data. It does not work with brackets instead of quotes or with single quotes or with no quotes. Do I need to signal that it is an sqlite file? Something like ODBC CONNECT TO ”sqlite:path”?

-david

rbecher
MVP
MVP

Maybe like this:

ODBC CONNECT TO [SQLite3 Datasource;Database=D:\Users\davideps\Desktop\test.sqlite;];

- Ralf

Astrato.io Head of R&D
Not applicable
Author

That did it! Thank you!

-david