???? ID: 285822 - ????? ???????: 03 ?????? 2010 - ??????: 2.0

??? ?? ?? ??? ?? ???? ??????? ?? Access ??? Microsoft Jet UserRoster ?? ????? ???? ?? ????????? ???? ?? ??? ???? ????

?????? ??????This article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.

?? ????? ??

??? ?? ??????? ???? | ??? ?? ??????? ????

??????

?? ???? ???? ?? ??????? ?? ??? ?? ???? ???? ???????????? ?? ???? ?? ?????? ?? ??? ??????????? ?? ??? Microsoft Visual Basic ?? ????? ???? ?? ??? ???? ?????? ???

Microsoft ???????????? ?????? ???? ???????? ?? ??? ??? ???? ??, ???? ??? ??? ?? ?????? ?? ?????????? ??? ??? ?????? ???? ?? ????.. ?????? ???????? ?????? ?? ???? ????? ???????? ?? ??? ???????? ????? ??? ?? ???? ?? ????? ???? ???.. ?? ??? ????? ?? ?? ?? ????? ?? ?? ??? ???????????? ???? ?? ?? ??????? ?? ?????? ??? ????? ????? ???????????? ?? ????? ?? ???? ???? ?? ??? ???? ?? ??? ??.. Microsoft ?????? ???????? ?? ????? ????????? ?? ???????????? ?? ?????? ??? ?????? ?? ???? ???.. ??, ?? ?? ???????? ?? ???? ??????? ?????????? ?? ?????? ???? ?? ??? ???????? ??????????????? ?? ?????? ?? ???????????? ????? ?? ??? ??????? ???? ??????..

?? ?? ????? ????? ??? ?? ????? ????, ????? ??????? ?? ??:
  • ???????? ?? ???.
  • ????? ????
  • ?? ???? ?? ???? ?????????? ??????? ?? ??? ??? ?????? ??? (??? ?????????? ID ???? ????? ??????? ??? ?? ?? ?? ????? ?????????? ?????????? ???? ?? ?? ??? ??? ?????????? ??????? ?? ??? ????? reclaimed ?? ?? ??.)
  • ?? ???? ?? ??????? ???????????? ?? ??? ?????????? ??????? ??? ???? ??? ???
?? ??????? ?? ??????? ???? ?? ?? ???? ??????? ?????????? ?? ?????????? ?? ??????? ???????? ?? ??? ???? ?? ??? ????? ???? ?? ???? ???

?? ??? 1 ?? ??? ?? ????.

???????: ??? ?? ?? ?????? ??? ??? ????? ?? ???? ????, ?? ????? ??????? Northwind.mdb ??????? ????? ?? ????? Northwind.mdb ???? ?? ??????? ?? ?? ????????? ?? ????? ????? ?? ???? ???? ?? ??? ?? ?????


?? ????????? ???? ???? ??????? ?? ??? ???? ??? ??, ????? ????? ?? ???? ????:
  1. ????? ???????, Northwind.mdb ??????

    ???:Access 2007 ???, Northwind2007 ????? ??????? ?????, Northwind2007 ????? ??????? ?? ??? ????, ?? ??? Northwind2007 ????? ??????? ?? ??????
  2. ????? ????????????? ??,??????? ???????????? ????-????? ????, ?? ???? ??????????.

    ???:Access 2007 ???, ????? ????Visual Basic????????????? ??????????? ???????? ?? ????? ????..
  3. ????? ????,???.

    ???:Access 2007 ???, ????? ???????????????? ???????????? ???????? Visual Basic Editor ????
  4. ???? ????, ?? ????? ??? ???????:

    ???:????? ??? ?? ?? ???? ??? Microsoft ActiveX ???? ???????? ?? ????? ???? ??? ??? ?? ????? ?? ??? ?? ??? ?? ??? ?? Microsoft ActiveX ???? ???????? 2.1 ?? ?????? ??????? ????????? ?????? ???? ?????? ??? ???? ?? ???, ????? ??????????????? ????????????? Visual Basic ?????? ???, ?? ????????? ???? ?? ??Microsoft ActiveX ???? 2.1 ???????? ???????????? ????? ????? ???
    Sub ShowUserRosterMultipleUsers()
        Dim cn As New ADODB.Connection
        Dim rs As New ADODB.Recordset
        Dim i, j As Long
    
        Set cn = CurrentProject.Connection
    
        ' The user roster is exposed as a provider-specific schema rowset
        ' in the Jet 4.0 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
    					
  5. ??????? ?? ??? ??? ??????ShowUsers.
  6. ??????? ????? ?? ????? ?? ??? CTRL+G ?????..
  7. ??????? ????? ??? ????? ?????? ???? ????, ?? ???? ??? ENTER ?????:
    ShowUserRosterMultipleUsers
    					
    ????? ??? ?? ??????? ????? ??????? ?? ??? ?? ???? ???? ???????????? ?? ???? ???? ???

???? ???? ???? ??:
  • Microsoft Office Access 2007
  • Microsoft Office Access 2003
  • Microsoft Access 2002 Standard Edition
??????: 
kbinfo kbexpertiseadvanced kbexpertiseinter kbhowtomaster kbmt KB285822 KbMthi
???? ?????? ???????????? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:285822  (http://support.microsoft.com/kb/285822/en-us/ )