0

I'm trying to use a SQLite database a linked server in SSMS. I've managed to get the ODBC driver installed and a linked server created, but I can't seem to find a way to get queries to work. I think it's just a matter of not understanding the proper syntax for it. Here's what I've tried:

exec sp_tables_ex 'SQLITE'

This works as expected, showing all of the tables in the database.

select * from SQLITE.[default].dbo.TRANSLATION

Fails with this error message

Invalid use of schema or catalog for OLE DB provider "MSDASQL" for linked server "SQLITE". A four-part name was supplied, but the provider does not expose the necessary interfaces to use a catalog or schema.

Taking a clue from that, I tried removing the schema:

select * from SQLITE.[default].TRANSLATION

But this gives me another error message:

Invalid object name 'SQLITE.default.TRANSLATION'.

Likewise, the following give the same error (with slight changes for the object name):

select * from SQLITE.[default].TRANSLATION

select * from SQLITE.dbo.TRANSLATION

select * from SQLITE.TRANSLATION

Any ideas? I'm not quite sure what to try from here.

Eric Andres
  • 3,417
  • 2
  • 24
  • 40
  • Can you use the OPENROWSET syntax? – Tim Jul 11 '12 at 16:11
  • I'll have to check that out. I don't know much about SQL beyond the basics. Unfortunately the reason I was trying to do this has now escaped me, and I'm not even sure I still have the ODBC driver installed. – Eric Andres Jul 12 '12 at 14:41

0 Answers0