VB .NET连接到本地.MDB [英] VB .NET CONNECT TO LOCAL .MDB

查看:88
本文介绍了VB .NET连接到本地.MDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我能告诉我如何连接到受登录和密码保护的本地计算机,然后打开此计算机上的.mdb文件吗?

Hi guys can u tell me how can I connect to the protected by login and password local computer and open a .mdb file which one is on this computer?

下面是一个代码,其中Z是本地计算机,而B是我们拥有数据库的文件夹.但是,每当我遇到错误时,我都不会打开magazyn.mdb.您能告诉我打开该.mdb文件必须添加的内容吗?

Below is a code where Z is a local computer but B is a folder where we have our database. But all time i got error with that i dont have premission to open magazyn.mdb. Can u tell me what i must add to this connectionString to open this .mdb file

 conn.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & _
"\\z\b\magazyn.mdb;"

推荐答案

您正在访问共享文件夹上的数据库文件.您必须设置共享\\z\b属性(以及文件系统安全性),以允许进行读/写访问并另外允许文件创建-访问需要创建锁(* .ldf)文件.

You're accessing database file on shared folder. You must set share \\z\b properties (and file system security too) to allow read/write access and additionally allow file creation - access needs to create lock (*.ldf) file.

这篇关于VB .NET连接到本地.MDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆