<b>若何肯定有多少人登陆数据库?</b>[Access防范]
本文“<b>若何肯定有多少人登陆数据库?</b>[Access防范]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
Sub?ShowUserRosterMultipleUsers()
????Dim?cn?As?New?ADODB.Connection
????Dim?cn2?As?New?ADODB.Connection
????Dim?rs?As?New?ADODB.Recordset
????Dim?i,?j?As?Long
????cn.Provider?=?"Microsoft.Jet.OLEDB.4.0"
????cn.Open?"Data?Source=c:\Northwind.mdb"
????cn2.Open?"Provider=Microsoft.Jet.OLEDB.4.0;"?_
????&?"Data?Source=c:\Northwind.mdb"
????'?The?user?roster?is?exposed?as?a?provider-specific?schema?rowset
????'?in?the?Jet?4?OLE?DB?provider.??You?have?to?use?a?GUID?to
????'?reference?the?schema,?as?provider-specific?schemas?are?not
????'?listed?in?ADO's?type?library?for?schema?rowsets
????Set?rs?=?cn.OpenSchema(adSchemaProviderSpecific,?_
????,?"{947bb102-5d43-11d1-bdbf-00c04fb92675}")
????'Output?the?list?of?all?users?in?the?current?database.
????Debug.Print?rs.Fields(0).Name,?"",?rs.Fields(1).Name,?_
????"",?rs.Fields(2).Name,?rs.Fields(3).Name
????While?Not?rs.EOF
????????Debug.Print?rs.Fields(0),?rs.Fields(1),?_
????????rs.Fields(2),?rs.Fields(3)
????????rs.MoveNext
????Wend
End?Sub
以上是“<b>若何肯定有多少人登陆数据库?</b>[Access防范]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |