SAMPLE: How To Manipulate the "Trustee PIN" Jet Property Using ADOX in VC (271774)



The information in this article applies to:

  • Microsoft Data Access Components 2.6
  • Microsoft OLE DB Provider for Jet 4.0
  • ActiveX Data Objects (ADO) 2.6

This article was previously published under Q271774

SUMMARY

ADOX.exe demonstrates the use of the Jet OLEDB:Trustee PIN property with the User and Group ADOX objects. These properties are only available when using the Microsoft Jet 4.0 OLE DB Provider.

MORE INFORMATION

The following file is available for download from the Microsoft Download Center:
Release Date: October 9, 2000

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file. The ADOX.exe file contains the following files:

File nameSize
EULA.txt2 KB
ADOX.cpp7 KB


Note It is important to connect to an Access 2000 database and point the Jet OLEDB:System database property to its related workgroup information file:
_bstr_t m_Conn("Provider=Microsoft.Jet.OLEDB.4.0; \ 
                Data Source=Access2000DB.mdb;User Id=Admin;Password=; \ 
                Jet OLEDB:System database=system.mdw");
				
In addition, the sample illustrates how to add or delete a user from a group and change the password for a user.

Steps to Run the Sample

  1. Create an empty Win32 console application.
  2. Insert the ADOX.cpp file into the project.
  3. Modify the connection string to point to an Access 2000 database and its related System.mdw file.
  4. Compile and then run the application.
Starting with Microsoft Data Access Components (MDAC) version 2.6, MDAC no longer contains the Jet components: Microsoft Jet, Microsoft Jet OLE DB Provider, and the ODBC Desktop Database Drivers. For additional information, and to download the newest version of Microsoft Jet, click the following article number to view the article in the Microsoft Knowledge Base:

239114 How To: Obtain the Latest Service Pack for the Microsoft Jet 4.0 Database Engine

The "MDAC 2.5 Stack and Windows File Protection" white paper contains a full list of the components that are shipped with MDAC 2.5, along with a discussion of Windows File Protection. Refer to this white paper for more information about the Jet dynamic-link libraries (DLLs) that are shipped in MDAC 2.5, which are no longer a part of MDAC 2.6:

Modification Type:MinorLast Reviewed:8/5/2004
Keywords:kbdownload kbfile kbhowto kbJET kbSample KB271774 kbAudDeveloper