How to share data access resources.

Property of

Database, DataModRef

Description

The share property controls how database connections and dataModules are shared. The share property is an enumerated property that can be assigned one of the following:

Value

Description

0

None

1

All

Database objects

Multiple Database objects may share the same database connection. Sharing database connections reduces resource usage on both the client and server. Some servers have a maximum number of simultaneous connections, so sharing connections will also allow more users to connect to the server.

When set to All (the default), all Database objects with the same databaseName property (running in the same instance of dBASE Plus) will share the same database connection. When set to None, each Database object will use its own connection.

DataModref objects

When set to All, all DataModRef objects with the same dataModClass property will share the same instance of that class; the same DataModule object. This means, for example, that navigation performed by one user of the DataModRef is seen by all users of that same dataModClass (if their share property is also set to All). dataModule sharing is only useful in limited cases. For typical usage, the share property should be set to None, the default.