Access 2007权限 [英] Access 2007 Permisions
问题描述
请帮助,这是我遇到的错误
记录无法读取;对''MSysObjects
没有读取权限
(我正在使用Access 2007)
Please help, this is the error i am getting
Record(s) cannot be read; no read permission on ''MSysObjects
(I am using Access 2007)
Dim ds As New DataSet<br mode=" provider="Microsoft.Jet.OLEDB.4.0;Data" source="D:\Sample.mdb")<br" mode="hold" /> cn.Open()
Dim cmd As New OleDbCommand("SELECT Name FROM MSysObjects WHERE type=1 and flags=0", cn)
Dim dr As OleDbDataReader
dr = cmd.ExecuteReader()
While (dr.Read())
ListView1.Items.Add(dr.GetValue(0).ToString())
End While
上面是我的代码,我该如何解决此权限
The above is my code, how do i solve this permission
推荐答案
使用下面的代码在mdb中获取表名:
Use the code below to get table names in mdb:
Dim sConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Sample.mdb"
Dim olecon As New OleDbConnection(sConn)
olecon.Open()
Dim dt As DataTable = olecon.GetSchema("tables")
olecon.Close()
GridView1.DataSource = dt
GridView1.DataBind()
如果要授予对MSysObjects的权限,请遵循以下说明:
1)工具->选项,在视图选项卡上选中系统对象".
2)工具->安全->在每个新表上的用户和组权限授予其管理员"访问权限.
来源@ ^ ]
If you wish to give permission to MSysObjects follow instruction below:
1) Tools -> Options, on the view tab check ''system object''.
2) Tools -> Security -> User and group permissions, on each of the new tables give it ''administrator'' access.
Source @ http://blogs.microsoft.co.il/blogs/dbaces/archive/2009/12/07/record-s-cannot-be-read-no-read-permission-on-msysobjects.aspx[^]
这篇关于Access 2007权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!