如何确定有多少人登陆数据库?

2008-02-23 08:04:57来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

以下为引用的内容: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" Www^^com

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 ~com

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 Www@@com

End SuD Www@@com

中国站.长.站

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:定期归档Access数据库

下一篇:解决Access中分组报表的问题