Access������--
ËùÊô·ÖÀࣺ ʵÓôúÂë ×÷Õߣº ¹²ïí ¸üÐÂÈÕÆÚ£º2003-10-18 9:54:42 ÔĶÁ´ÎÊý£º158

ʹÓà Jet UserRoster ¼ì²éÊÇË­µÇ¼µ½Êý¾Ý¿âÖÐ


¡ù±ØÐëÒýÓÃMicrosoft ActiveX Data Objects 2.x Library

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 ADOs 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



--------------------------------------------------------------------------------
Ïà¹ØÎÄÕÂ

ROSE¼¼Êõ°×ƤÊé 2003-12-15 12:34:14
Á˽â Microsoft Access °²È«ÐÔ 2003-11-13 11:21:08
±£»¤Access 2000Êý¾Ý¿âµÄ°²È« 2003-11-13 11:16:12
ACCESSµÄÊý¾Ý¿â°²È«ÎÊÌâ½â´ð 2003-11-13 10:52:11
½« Microsoft Access ÓÃ×÷ Automation ·þÎñÆ÷ 2003-10-14 8:37:19
AccessÆô¶¯ÃüÁîÐÐÑ¡Ïî´óÈ« 2003-10-10 10:02:00


ϵͳÓÅ»¯
¿Ø¼þʹÓÃ
Êý¾Ý¿âÉè¼Æ
Êý¾Ý¿âÁ¬½Ó
ϵͳ°²È«
OLE×Ô¶¯»¯
³£¼ûÎÊÌâ
ʵÓôúÂë
ÊôÐÔÏê½â
ÍøÂçÏà¹Ø
ʵÓÃAPI
¾­Ñé·ÖÏí
¾«Ñ¡½Ì³Ì
×Ö·û´¦Àí
ADPÏà¹Ø



ÎÄÕÂËÑË÷



ÖÆ×÷ά»¤£ºÀîÑ°»¶     Mail:[email protected]

¹ØÓÚ±¾Õ¾ -- ÍøÕ¾·þÎñ -- °æȨÌõ¿î -- ÁªÏµ·½·¨ -- ÍøÕ¾°ïÖú
Access°®ºÃÕß°æȨËùÓÐ Copyright 2003-2005 All Rights Reserved δ¾­Ðí¿É²»µÃµÁÁ´