Insert into SQlite DB from SQL Server 2014

风格不统一 提交于 2019-12-12 02:53:18

问题


I've successfully created a linked server between SQL Server 2014 (x64) and a SQLite database via ODBC.

I can select from the SQLite database with no problem.

select * 
from openquery(mp_test, 'select test1 from test2')

When I try to insert a record into to the database I get the following error :

OLE DB provider "MSDASQL" for linked server "mp_test" returned message "unable to open database file (14)".

Msg 7343, Level 16, State 2, Line 4
The OLE DB provider "MSDASQL" for linked server "mp_test" could not INSERT INTO table "[MSDASQL]".

All user has full control on the SQLite database file.

The code what I used for the insert :

insert openquery(mp_test, 'select test1 from test1 where 1=0') VALUES ('12')

Any idea?

来源:https://stackoverflow.com/questions/36643296/insert-into-sqlite-db-from-sql-server-2014

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!