Login    Password        Sign Up   Forgot Password
Saturday, May 27, 2023


Site Search


Site Server 3 
Visual C 
Desktop Appl. 
Distributed Appl. 
Outlook 2000 
FrontPage 98 
VB6 Distributed 
Visual Interdev 6 
Win. Architecture 



MCSE Cert.
Cisco Cert. 
The Work 
Areas of Work 
Career Prospects 


Govt. Exams

VB6 Distributed


Distributed Applications

They are client/server applications that use a network in a multi-tier architecture to distribute their presentation services, business logic, and data services. These applications often access many different data sources. The COM components contained in these applications typically participate in transactions, and they can be shared by multiple users and multiple applications.  

MOC Chapter 1: Microsoft’s Enterprise Development Strategy

This chapter discusses the different types of client/server applications that can be built using Microsoft technologies. It emphasizes the important separation of services into different tiers (or levels) when building solutions that are to be developed over a distributed network such as the Internet.

  • Different services are implemented in either the User (Presentation), Business or Data services tiers. Although this course primarily discusses 3-tiered applications, the exam often uses the term "n-tiered" to reflect the ever-growing focus on Internet-deployed applications. It simply reinforces the fact that these three main separations can be even further sub-divided into other logical units. Essentially, the User, Business and Data services layers are the main sub-divisions from which others can be branched off.

  • Any interface that the user interacts with (i.e.: database front end) is placed in the User layer, all business rule processing (i.e.: credit card limit checks, tax calculations, etc.) is done in the Business layer and any services which provide data (i.e.: SQL Server database) to the middle tier (and ultimately the user) are placed in the data services layer. Remember that business services are considered to be clients of the data services layer which provides services to it. The three services (User, Business and Data) are collectively known as the Microsoft Application Model.

The chapter continues to briefly discuss COM, its main advantages and how it is implemented (how classes interact). More on this later.

  • The main advantages of COM are code reusability, cross-platform interoperability, version control - and the fact that testing COM components is much easier than testing traditional applications that do not use COM.

Finally, this chapter also discusses the Microsoft Solutions Framework (MSF) Process Model. There are four stages in this model: envisioning, planning, developing and stabilizing. Once each step is complete, a "milestone" is reached. There isn’t much emphasis on this material, however, as it is specifically tested in core Exam 70-100 - Analyzing Requirements and Defining Solution Architectures.

MOC Chapter 2: Building COM DLL’s with Visual Basic

COM DLL’s are implemented in the Business Services layer. When using Microsoft Transaction Server (MTS), COM components must be implemented as DLL’s. This chapter covers the basics of Visual Basic DLL class modules but it emphasizes several key points

  • Business services in MTS must always be compiled as COM DLL’s.

  • DLL’s are in-process servers (components that run in the same memory process as the client) that are typically faster than their ActiveX EXE counterparts.

  • All class modules have 2 built-in events by default: initialize and terminate.

  • Methods in class modules are created using PUBLIC Sub or Function procedures.

  • Because business service DLL’s act as servers to the User services layer, there is typically no visual interface involved – and hence no need to expose any properties in the DLL.

  • Events (such as errors) are raised in the COM DLL server and handled in the client. Error handling should be taken care of as much as possible in each individual component.

  • Unhandled errors in COM DLL’s are passed back to their calling procedures – and ultimately, the client. If the client doesn’t handle the error, the application will terminate.

  • Unattended Execution can only be used with components that do NOT have a visual interface (i.e.: messages are typically written to logs instead of presented in message boxes).

  • When creating COM DLL’s for MTS, you should choose the apartment-threaded model.

  • The instancing property for business objects (DLL class modules) should be set to MultiUse. The SingleUse and GlobalSingleUse instancing properties do NOT apply to COM DLL’s.

  • When the DLL is compiled, each class module in the DLL is assigned a unique class ID (CLSID). A library identifier (LIBID) is also generated for the DLL that describes all of the classes, their properties and methods.

  • Version Compatibility options include: No Compatibility, Project Compatibility and Binary Compatibility. If you want a component to remain compatible with previously compiled versions of the DLL, choose Binary Compatibility. Choosing this option also makes sure that you will be warned if your new DLL has any features that are incompatible with earlier versions. Choose No Compatibility for new projects, Project Compatibility for projects that are still in the testing stage and Binary Compatibility to maintain compatibility with components that have already been implemented and gone live.

  • To test an ActiveX DLL, open the DLL project, add a new project and then choose Standard EXE. A template for this new project will be added to the Project Group window. Next, right-click on the Standard EXE project and choose Set as Start Up. Finally, add a reference to the ActiveX DLL project by clicking on Project in the Visual Basic menu bar and then choosing References. To test an ActiveX EXE project, you must open a second (separate) instance of Visual Basic because ActiveX EXE’s run out-of-process.

  • There are 3 ways to register a COM DLL: compile the DLL, use a set-up program – or use the regsvr32.exe utility. Syntax is: regsvr32.exe sample.dll

  • To unregister a COM DLL, use the regsvr32.exe utility with the /u switch as in the following example: regsvr32.exe /u sample.dll

MOC Chapter 3: Introduction to Microsoft Transaction Server (MTS)

Part of the NT 4.0 Option Pack, Microsoft Transaction Server (MTS) can be thought of as the infrastructure that is responsible for the management of transactions in a multi-user environment (a component-based transactions processing system). Because transactions management is its sole focus, the application programmer need not worry about issues such as security, data integrity and the proper handling of transactions over the network. He or she can thereby concentrate on programming the individual components that interact with it.

MTS works on an all-or-nothing principle and manages resources in an effective way using just-in-time activation and connection pooling. Using these three methodologies, MTS is able to conserve valuable resources such as memory, processing time and network bandwidth. In addition, MTS also integrates the tight security features of Windows NT.


Points to remember for the exam

  • To use MTS, components must be compiled as COM DLL’s. An MTS application is implemented as a group of packaged COM DLL’s.

  • All COM DLL’s that are used in MTS must be part of a package (which define the security boundaries of the application).

  • Once you have access to one package (i.e.: you have passed the security check to access its components), there are no subsequent security checks for components within the same package. MTS does check security, however, when you try to access components’ methods across different packages.

  • Resource Managers manage durable data. Examples of resource managers include databases (SQL, Oracle, etc.), message queue systems like MSMQ Server and transactional file systems.

  • Resource Dispensers are services that manage non-durable data. Examples include the ODBC resource dispenser (used for connection pooling) and the Shared Property Manager.

  • Microsoft DTC (Distributed Transaction Coordinator) coordinates transactions over multiple resource managers. It ensures the all-or-nothing transaction processing rule (either all transactions are committed – or none are).

  • MTS Explorer is used to manage components and packages on MTS. It allows you to create packages, add or delete components from packages, distribute packages, install and maintain packages and monitor transactions. Package properties (such as identity and security) can also be set from the MTS Explorer.

  • To create a new package using MTS Explorer, first click on the Packages Installed folder. From the Action menu, choose NEW and then PACKAGE. You can alternatively right click on the Packages Installed folder, click NEW and then choose PACKAGE as well. When the Package Wizard shows up, choose Create an Empty Package and enter a name for the new package. You can also import pre-built packages (that were created using the export function) by using the Install pre-built packages option.

  • To set the properties of the new package, right click on the package in MTS Explorer.

  • To add a component (DLL) to a package, double-click the Packages Installed folder and then double click on the package that you’d like to add the component to. At this point, click on the Components sub Folder, click New on the Action menu and then choose Component. As an alternative to the Action menu, you can also right-click the Components Folder, click New and then select Component. The last step is to follow the instructions in the dialog boxes, select Add Files (choosing the components that you would like to add to the package) and then click Finish.

  • You can also add components to the Components folder of a package by dragging DLL files from Windows Explorer to the package in MTS Explorer.

  • Once a component (DLL) becomes part of a package, MTS modifies the corresponding entries for each class in the Windows registry so that they can run under MTS: a LocalServer32 key is added (containing the path to the MTS executable), a /p parameter is added to the Mtx.exe path (which specifies the identity of the package that contains the class) and the InProcServer32 key is cleared (empty value assigned) as it is no longer needed.

  • Remember that a component can only be included in one package on a single computer and that a package’s components cannot be split across computers. You can duplicate packages, however, so that multiple copies of it and its components reside on multiple (different) computers.

  • To export a package, double-click the Packages Installed folder, select the package that you’d like to export and then choose Export from the Action menu. As an alternative to the Action menu, you can also right-click on the package and select Export. Follow the dialog box instructions which follow.

  • Package files have a .pak extension.

  • When a package is exported, a Clients folder is created in the directory where the package file is exported to. You will find a client application executable in the that same folder which will allow you to configure a client to remotely use the MTS components in the package. To install the executable, simply run it on the client computer. Do not ever run this client application executable file on the server!

  • The client which accesses the MTS components does not need to have any MTS files installed – just DCOM support (Distributed Component Object Model). Windows NT clients (version 3.x or later) already have DCOM support but Windows 95 clients do not. DCOM can be downloaded from the Microsoft web site for Win95 clients.

MOC Chapter 4: Using MTS Transaction Services

When MTS manages transactions (changes in data from one state to another), it makes sure that the four ACID principles are always applied: atomicity, consistency, isolation and durability. These properties ensure that transactions are either properly committed or rolled back from the time that the transaction begins to the time that it ends (either normally or otherwise).  

  • When an MTS object is accessed and created (by the client or another object), it must be aware of its context. MTS creates a context object for each MTS object instance. The context object informs the MTS object of its environment and that it is participating in a transaction. Transactions must be initially stateless to participate in transactions.

  • MTS also uses the context object to track the success or failure of transactions. If an object completes its work successfully, it is noted in the context object. Likewise, if an object fails to complete its work, the failure is noted in the context object. When all context objects report successes, then MTS commits the transaction – otherwise if there is even one failure being reported by an object (in its respective context object), then MTS rolls back the entire transaction, undoing any changes that were made.

  • To determine how a class participates in transactions, set its Transaction attribute. This can either be set from within MTS (by right-clicking the class name in MTS Explorer, choosing properties and then clicking on the Transactions tab) – or by using the properties window (for the particular class module) in Visual Basic.

  • Choose Requires a transaction if the object MUST have a transaction. Choose Requires a new transaction if the transaction must be new and separate from all others. Choose Supports transactions if transactions support may be needed and Does not support transactions if the object will not participate in any transactions.

  • Context information about each object is stored in the ObjectContext object. This object is responsible for the tracking of individual MTS objects’ work successes or failures as well as security information. When a object completes its work successfully, the SetComplete method of the ObjectContext object should be called. If, on the other hand, an object’s work fails to complete, the SetAbort method of the ObjectContext object should be called. SetComplete informs the object context that it can commit transaction updates – and release the state of the object (and any resources that it was using). SetAbort, on the other hand, informs the object context that any transaction updates for that object (and any other objects within the same transaction) must be rolled back to their original state – even if the other objects completed successfully and called SetComplete. Remember: all or nothing.

  • Objects can get references to their respective ObjectContext by using the GetObjectContext function.

  • When an MTS object that needs access to its context information needs to be created, use the CreateInstance method of the ObjectContext object.
    Example: set objExample = GetObjectContext.CreateInstance("Sample.Class")

  • There are three ways to create objects in VB: using the New keyword, using CreateObject and calling the CreateInstance method of the ObjectContext object. The first two methods will create MTS objects – but unlike CreateInstance, they will not inherit the object’s context information. Unless CreateInstance is used, the object will not be able to participate in any transactions and will not have access to security information.

  • MTS uses just-in-time activation to create and release objects as they are needed and connection pooling to manage open database connections. Both help reduce the consumption of valuable system resources by recycling objects.

  • In order to ensure that the application remains scalable (performance isn’t affected as application use increases), you should try to avoid maintaining state as much as possible. State is object data that is maintained over several method calls. State consumes resources such as memory, disk space and database connections. MTS requires stateless objects. Remember to obtain resources late and to release them as early as possible.

  • Error handling should be implemented when transactions are rolled back from SetAbort calls. If a transaction aborts and you do NOT raise an error to the client, MTS forces an error to be raised. Error trapping code should be used in each object using On Error Goto syntax.

  • Other services provided by MTS include Trace Messages, the Transactions List and Transaction Statistics. The Trace Messages window lists any messages issued by Microsoft Distributed Transaction Coordinator (DTC), the Transaction List window shows any transactions in which MTS is currently participating and the Transaction Statistics window allows you to view information about transactions since the DTC was started (example: number of transactions that were committed, aborted, transaction response times, etc.).

MOC Chapter 5: Accessing Data from the Middle Tier

  • There are three kinds of database components: data consumers, data services and data providers. An example of a data consumer would be a database front end written in a language such as Visual Basic or C++. Other examples include Active Server Pages and even the high-level ADO programmatic interface itself. Data Services refer to the cursor engines and query processors that take on some of the work that the database would normally do, speeding up operations significantly and allowing the database to focus solely on serving data to its eventual consumers. Finally, data providers refer to the actual databases themselves (both relational or non-relational). Typical examples of data providers include SQL Server 7, Oracle and mainframe databases.

  • Remember that OLE-DB is able to access both relational and non-relational database information. Non-relational databases include information such as traditional file systems and e-mail stores.

  • UDA (Universal Data Access) is Microsoft’s latest strategy for universal data access. By using high-level programmatic interfaces such as ADO (Active X Data Objects), programmers are able to access any kind of information from both relational and non-relational databases. ADO works on top of OLE-DB (the lower-end programmatic interface), which is able to access the eventual data. In effect, OLE-DB supercedes the older ODBC data access method by being able to access non-relational data as well. ODBC only accesses relational databases. ADO is also a replacement for the older DAO (Data Access Objects) and RDO (Remote Data Objects) data access technologies.

  • There are three ways that you can use ADO in Visual Basic

    1. Using the Data Environment Designer, which is perhaps the easiest way to graphically bind objects to data.

    2. Using the Microsoft ADO Data Control 6.0 (OLEDB) ActiveX Control from the toolbox (you must first add the component through Project, Components before using it).

    3. Accessing ADO programmatically (set a reference to the Microsoft ActiveX Data Objects Library 2.0 Library first through Project, References).

  • The Data Environment Designer always provides a default Connection ("Connection1"). You do not have to initially add one to the environment.

  • Once a data environment is configured (at least one connection to a database is established), you can use the Data View Window to view information about the database’s structure (tables, stored procedures, views, etc.).

  • When binding controls to data using the DataEnvironment Designer, remember to set the DataMember property to the name of the Data Environment Designer Command which accesses the data that you are interested in.

  • When using the ADO ActiveX control to bind data to a control such as a text box, set the bound control’s DataSource and DataField properties.

  • There are three principle objects in the ADO object hierarchy

    1. Connection (with an errors collection)

    2. Command (with a parameters collection)

    3. Recordset (with a fields collection)

  • To use ADO’s objects, you must

    1. Set a reference to the ADO library.

    2. Establish a connection, specifying the data provider and passing any important connection information such as UserID, password and data source (by setting the connection object’s ConnectionString property).

    3. Open the connection.

    4. Access and manipulate data by using the ADO recordset object.

    5. Close the connection.

  • There are three ways to access the recordset object in ADO

    1. Use the Open Method

    2. Call the Execute method of the Connection object

    3. Call the Execute method of the Command object

  • Use the execute method of the connection object when the command needs to be issued only once. If, on the other hand, you have to issue the command several times, use the execute method of the command object. It takes up fewer system resources to use one connection object (with several command objects) than to have several distinct connections open at the same time. Prepared command statements also execute faster.

  • When discussing cursors ("current set of records"), there are different types, locations and locking strategies available and they are distinguished by their ability to be scrollable and or updateable:


Cursor Type Information


not scrollable

Read Only

Least expensive resource-wise
Fastest cursor type
Useful for filling list boxes, etc.



Updateable but changes by other users are not immediately visible

Copy of records is retrieved
(snapshot information)
They are used in disconnected recordsets



Can’t see inserts

Keys are used for each record



Can see all additions, deletions and changes

Most flexible cursor type
Most expensive resource-wise

Cursor Location Information:


Used with disconnected (client-side) recordsets




Locking Strategies


(default) – data cannot be changed


The record is locked immediately upon entering edit mode


The record is locked only when the update is requested


Used with disconnected recordsets


  • To use a disconnected recordset, the correct property settings are

    rs.CursorLocation = adUseClient
    rs.CursorType = adOpenStatic
    rs.LockType = adLockBatchOptimistic

  • Whenever OLE-DB (lower-level programmatic interface) issues any errors, they are stored in the ERRORS collection, whereas whenever ADO (higher-level programmatic interface) returns any errors, they are sent to the Visual Basic ERR object. Always use proper error handling to respond to both types of errors.

  • The command object’s parameter collection must be populated. To add parameters to the collection, create each parameter object first by using CreateParameter and then add each parameter to the collection using the Append method:

Set param1 = cmd.CreateParameter("vLastName", adVarChar, adParamInput, 20, "Smith") cmd.Parameters.Append param1  

  • The Direction property setting within the CreateParameter statement (see example above) determines if a parameter is set for input, output or both. adParamInput is the default.

MOC Chapter 6: Building Stored Procedures with SQL

This chapter is not heavily emphasized on the exam. Exam 70-029 - Designing and Implementing Databases with Microsoft® SQL Server™ 7.0 tests this knowledge in greater detail.  

  • Note the difference between a regular query, a stored procedure and a database trigger. Stored procedures execute much faster than queries because they are compiled. Triggers are special stored procedures that respond to modification attempts (insert, update or delete) on a database. These special procedures (which enforce the integrity of the database) are automatically triggered in response to these attempts.

  • Know the syntax of basic SQL SELECT statements. For example:




  • Know the proper SQL syntax for database joins. You will always have one fewer JOIN statement than the number of tables. For example, if you are joining 3 tables, you will have 2 JOIN statements in the SQL statement, as illustrated below:




CustomerID (primary key) lastname, firstname, etc…


CustomerID (foreign key) airlineID (foreign key) ticketprice, etc…


airlineID (primary key) number, departuretime, etc…

SELECT customers.lastname, flights.number, SUM(reservations.ticketprice) FROM customers

JOIN reservations ON customers.customerID = reservations.customerID

JOIN flights ON reservations.airlineID = flights.airlineID

MOC Chapter 7: Implementing Security in MTS and SQL Server

This chapter focuses on security issues in both MTS and SQL Server. Emphasis on the exam is placed solely on MTS security – and specifically, how it is implemented in packets and how components are accessed between them. There are two types of security that you can use in MTS – declarative and programmatic. Declarative is the most widely used of the two.  

  • Declarative security is implemented on MTS by setting up roles. Windows NT User Manager for Domains is then used to map user and group accounts to these roles.

  • A role is the name of a group (created using MTS Explorer) that is used to define a specific group of related users - allowing them access to components in a package. Each role defines the names of specific users that are allowed access to the interfaces (methods) of components within MTS packages. In other words, whenever someone tries to gain access to the interfaces of a component, roles determine which users have the rights to do so.

  • There are no security checks for method calls between components in the same package because components in the same package trust each other.

  • Whenever a request for a component is made from outside a package, however, security checks are invoked. If a component in Package A calls a method from another component in Package B, for example, security is checked.

  • To create a role, select the MTS package that you want to include it in and double-click on the roles folder. Next, click New on the Action menu and choose Role. As an alternative, you can also right-click on the roles folder, click New and then Role. Follow the instructions that follow.

  • To assign roles to components or their interfaces, select the component or interface within it that will include the role, double-click the Role Membership folder, and then click New and then Role from the Action menu. You can also right-click on the Roles Membership folder, click New and then Role. In the dialog box that follows, select the pre-defined roles that you would like to add to the Roles Membership folder and then click OK.

  • When you are ready to distribute your application, you must map Windows NT users to your roles. You do this using Windows NT User Manager for Domains. To add (map) users to existing roles, open the package first, then open the Roles folder and double click on the specific role that you’d like to add users to. Open the Users folder and then click on New and then Users from the Action menu. You can also right-click Users, choose New and then Users. In the dialog box that follows, add your NT groups or users to the role.

  • You can implement security at both the package level and the component level in MTS. Component-level security can be set for each individual component in the package but package-level security is only set once for the whole package.

  • In order for component-level security to be enabled, package-level security must be enabled first. As soon as package-level security is disabled, component-level security for all components in that package becomes disabled as well.

  • To enable or disable security, right click on the package or component, choose Properties and then click the Security tab. Finally, check or clear the Enable authorizing checking check box.

  • There are three security modes available in SQL Server

    1. Standard Security – uses SQL Server’s own login validation process. Connections made to databases using this security mode are known as non-trusted.

    2. Integrated Security – uses Windows NT to validate SQL Server logins. Connections made to databases using this security mode are known as trusted.

    3. Mixed Security – can use either Standard or Integrated security.


MOC Chapter 8: Implementing COM with Visual Basic

This chapter outlines how the COM standard allows clients to communicate with component objects through the interfaces which they expose. Interfaces are represented as contracts between clients and servers which ensure that objects always implement an interface’s functions in a standard way. Note that emphasis on the exam is largely on object binding and not the specific details of how COM works.

  • All objects must support the IUnknown interface. IUnknown has three methods

    1. AddRef (called when you use the SET statement)

    2. Release (called when you set an object variable = Nothing)

    3. QueryInterface (checks to see if specific interfaces are supported)

  • The IDispatch interface is used to expose an object’s methods and properties. It also inherits the 3 functions from the IUnknown interface. IDispatch has 4 methods of its own

    1. GetTypeInfo

    2. GetTypeInfoCount

    3. GetIDsOfNames

    4. Invoke

  • Late Binding occurs when a reference to a specific object type is not made. In other words, the variable is declared as type Object as in the following example: Dim objX as Object

Declaring a variable as VARIANT is also considered to be late binding.

  • Early Binding occurs when a reference is made to a specific object type. At compile time, the compiler is able to check all object references against information in the object’s type library. The following is an example of early binding: Dim objY As ADODB.Command

This type of binding also allows the compiler to optimize access to the object and results in two types of early binding: dispID binding and Vtable binding. Vtable binding is faster and more efficient than dispID because it makes fewer method calls to the IDispatch interface.  


MOC Chapter 9: Advanced Client / Server Technologies

This chapter is not emphasized on the exam.  

OTHER INFORMATION covered by exam 70-175 (but not appearing in the MOC)

  • The proper syntax for a pop-up menu in Visual Basic is Me.PopupMenu mnuMyMenu. You can replace Me by the name of the form if you like. This code can be placed in either the form’s MouseUp or MouseDown event and the menu should be invisible initially.

  • An application’s HelpFile can be set programmatically using the Visual Basic APP object.

  • The StatusBar control has a panels collection that begins with index 1, not 0. It has two styles: sbrNormal and sbrSimple. When using the simple style, use the SimpleText property to provide messages in the one, continuous status bar. If sbrNormal is chosen, on the other hand, use the Text property to issue messages in one or more of the panels.

  • The proper syntax for the TreeView control is:

Treeview.Nodes.Add( [Relative], [Relationship], [Key], [Text], [Image], [Selected Image] ) as node

  • The ListView control can sort information by using the following properties: Sorted, SortKey and SortOrder.

  • DHTML is supported by Microsoft Internet Explorer 4.x or higher. DHTML is a client-based solution for applications deployed over the Internet.

  • Internet Information Server (IIS) uses web classes and Active Server Pages (ASP). IIS is a server-side solution for applications deployed over the Internet. Clients using web browsers make requests to the IIS server and the server replies with responses (WriteTemplate method, for example).

  • DHTML applications generate a .HTM file and a compiled .DLL file.
    ActiveX documents generate .VBD and .DLL (or .EXE) files.

  • A connection to a database must be established and open before any transactions or execution statements can be issued:

Cnn.Open ‘a statement similar to this one must precede those which follow Cnn.BeginTrans Cmd.Execute

  • Use the FRIEND keyword instead of Private or Public when you want class interfaces (properties, methods) to be accessible ONLY to other classes in the same project.

Home | Abroad | Academics | Advice | Alumni Associations | Career Watch | Competitive Exams | Career Counseling | Distance Education | Forms | Organisations | Relax Zone | MBA | Engineering | Medical | Humanities | Sciences | Computers ICSE/ISC/CBSE | Scholarship | Loans
 Contact Us | Feedback | Advertise | Disclaimer | Privacy Policy
©2000-2001 All rights reserved "DD Web Vision Private Limited"

Site developed by