About the User Component

The User component is used in a straightforward way, to read information stored in Microsoft Exchange Server or in Microsoft SQL Server and to automate the processing of requests. It determines the queue position of the request and the number of items checked out by that user.

This is a diagram of the User COM component:

As is the case with all COM components, User supports the IUnknown and IDispatch interfaces. You can learn more about these interfaces in reference materials about COM programming or component creation with Microsoft® Visual Basic®. You can also query for these topics in the Microsoft Platform SDK. For information on the other interfaces exposed by this component, see Automatic Object Interfaces.

These are the methods and properties used most often: UpdateInfoFromExchange, UpdateFromTable, Requests, MakeRequest, Position, Location, and DSN. For more information, see the following table.

User Interface Properties and Methods

Properties and methods Description
Properties  
Alias E-mail alias of borrower. A default property, also an optional parameter in UpdateInfoFromExchange.
ConnectionString The OLE DB connection string.
FirstName Library item borrower's given name.
LastName Library item borrower's surname.
Location Library item borrower's office number.
Department Library item borrower's department number.
Title Library item borrower's job title.
TelephoneNumber Library item borrower's telephone number.
BorrowerNo Library item borrower's borrower number within the FmLib database requests table. Also see borrower#.
Requests List of outstanding requests made by this borrower.
Checkouts List of items checked out to this borrower.
Methods  
GetInfoFromTable Retrieves information about the borrower from the FmLib database borrower table.
UpdateInfoFromExchange Updates information on a given user by querying the Microsoft Exchange Server directory.
MakeRequest Enqueues a request for a library item.
Position Finds position within the request queue of the borrower.

For more information about these properties and methods, see User Object in the CML Object Reference.

Design Note: Multiple Properties in the User Component

As you can see in this table, the User component contains many properties. This makes it possible to let pieces of information be used on a more individual, granular level. Also, the more common ones are used as parameters on the methods. This design scheme gives more flexibility in invoking methods and limits the number of times it's necessary to set properties.

For example, some properties such as Alias (a default property) are also added as optional parameters in certain methods such as UpdateInfoFromExchange. This means that to call UpdateInfoFromExchange you don't have to take the additional step of setting the Alias property first.