使用openfiledialog打开网络路径的文件时,对话框中未显示网络路径的解决方法

sqlite不支持读取网络路径上的数据库,但可以变通一下,将网络路径映射到本地路径,就可以实现。

如果我们创建共享目录的用户与当前用户不一致,在使用OpenFileDialog选择文件时,对话框中无法显示网络路径,解决方法:

Possible solutions I found

Solution 1: Forcing windows to make the network drives available to standard and administrator acounts:

1 - run regedit

2 - locate HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

3 - create a new DWORD entry with the name EnableLinkedConnections and value 1.

4 - restart your computer

5 - now you can see and use network drives with these installers or applications.

posted @ 2022-12-12 17:10  SimpleGIS  阅读(105)  评论(0编辑  收藏  举报