Connect to SQLite using ODBC without register database

前端 未结 2 692
礼貌的吻别
礼貌的吻别 2021-02-06 12:47

Is it possible to connect to SQLite in C++ and using ODBC API without register the database in ODBC?

I have code that uses ODBC talking to databases and don\'t want to r

相关标签:
2条回答
  • 2021-02-06 13:25

    you should be able to do it without any code changes using sqliteodbc.

    0 讨论(0)
  • 2021-02-06 13:40

    Short answer, use one of the following connection strings:

    Driver=SQLite ODBC Driver;Database=full-path-to-db;...
    Driver=SQLite3 ODBC Driver;Database=full-path-to-db;...
    

    Long answer: The readme file included with the sqliteodbc driver covers the methods for connecting, using a DSN-less connection string.

    See http://www.ch-werner.de/sqliteodbc/html/index.html

    0 讨论(0)
提交回复
热议问题