简体   繁体   English

通过链接的服务器通过映射的网络驱动器从MS SQL Server 2012更新SQLite数据库

[英]Updating SQLite database from MS SQL Server 2012 via Linked Server over Mapped Network Drive

I'm trying to connect MS SQL Server 2012 to an SQLite database on another machine using Linked Server via a mapped network drive. 我正在尝试通过映射的网络驱动器使用链接服务器将MS SQL Server 2012连接到另一台计算机上的SQLite数据库。

I've successfully set this up and I'm able to read from the SQLite database over the network. 我已经成功设置好了,并且可以通过网络从SQLite数据库读取。 However, when I try to update a value in the SQLite database using MS SQL Server, I get an error. 但是,当我尝试使用MS SQL Server更新SQLite数据库中的值时,出现错误。 For example: 例如:

UPDATE [SQLiteDatabase]...[ValuesTable] SET Value = 150 WHERE Id = 4;

Then I get this error: 然后我得到这个错误:

OLE DB provider "MSDASQL" for linked server "FastToolsDEM" returned message "unable to open database file (14)".
Msg 7343, Level 16, State 4, Line 1
The OLE DB provider "MSDASQL" for linked server "FastToolsDEM" could not UPDATE table "[FastToolsDEM]...[Numbers]".

If I copy the SQLite database to the local C: drive and make a local ODBC connection to the copied database, then it works successfully! 如果我将SQLite数据库复制到本地C:驱动器,并与复制的数据库建立本地ODBC连接,那么它将成功运行!

With regards to the mapped network drive, I am able to read, modify, write and delete without any problems system where MS SQL Server is installed using Windows Explorer and any other applications, which is expected because the share is set to "Read/Write" for "Everyone". 关于映射的网络驱动器,我能够使用Windows资源管理器和任何其他应用程序安装MS SQL Server的系统无任何问题地进行读取,修改,写入和删除,这是可以预期的,因为共享设置为“读/写” “ 为了每一个”。

The problem I'm having is only specifically when trying to update the database from within MS SQL Server 2012 Management Studio. 我遇到的问题仅是在尝试从MS SQL Server 2012 Management Studio中更新数据库时才出现的。

I've added some version information below: 我在下面添加了一些版本信息:

SQLite 3.8.0.1 SQLite 3.8.0.1

SQLite3 ODBC Driver 0.995.00.00 SQLite3 ODBC驱动程序0.995.00.00

Microsoft SQL Server Management Studio 11.0.3000.0 Microsoft SQL Server管理Studio 11.0.3000.0

Microsoft Analysis Services Client Tools 11.0.3000.0 Microsoft Analysis Services客户端工具11.0.3000.0

Microsoft Data Access Components (MDAC) 6.1.7601.17514 Microsoft数据访问组件(MDAC)6.1.7601.17514

Microsoft MSXML 3.0 4.0 6.0 Microsoft MSXML 3.0 4.0 6.0

Microsoft Internet Explorer 8.0.7601.17514 Microsoft Internet Explorer 8.0.7601.17514

Microsoft .NET Framework 4.0.30319.1008 Microsoft .NET Framework 4.0.30319.1008

Operating System 6.1.7601 操作系统6.1.7601

Windows 7 Enterprise Windows 7企业版

Thanks! 谢谢!

It seems that you have used a different ODBC driver. 似乎您使用了不同的ODBC驱动程序。 Please check whether your system is 32 bit or 64 bit. 请检查您的系统是32位还是64位。 The linked server will not work in 32 bit machines if you have used 64 bit driver. 如果使用64位驱动程序,则链接服务器将无法在32位计算机上工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM