Previous Page

CHAPTER  10

Creating Multiuser Applications

If you're developing an application for multiple users on a network, you want to make sure that your application helps users share data effectively. This chapter covers issues you should consider when creating a multiuser application. It explores locking strategies that control multiuser access to data and discusses ways your application can handle locking conflicts in a multiuser environment.

Multiuser Applications and Locking

When working in a single-user environment, your application doesn't encounter conflicting requests for resources. Because only one user is accessing data at a time, you can reasonably assume that the needed data will always be exclusively available. In a multiuser environment, on the other hand, multiple users may be accessing data at the same time, so the only reasonable assumption is that conflicts will occur when two or more users try to change the same data.

You can prevent such conflicts by making sure that only one user at a time can change data. To protect shared data in this way, you can lock data while a user edits it. When data is locked, any number of users can read it, but only one user can make changes to it.

There are two techniques you can use to lock data in your multiuser application: bound forms and Visual Basic code that makes direct updates to data in Recordset objects. When you use bound forms, Microsoft Access performs certain aspects of locking automatically. Alternatively, you can write your own locking procedures in Visual Basic; this approach gives you more control over your application's locking behavior.

© 1996 Microsoft Corporation. All rights reserved.

Next Page


Casa de Bender