<p>If you are creating a DLL (Active Library), you must specify
the threading model in the Remote Data Module wizard. You can
choose Single-threaded, Apartment-threaded, Free-threaded, or
Both.<br>
<br>
If you choose Single-threaded, COM ensures that only one client
request is serviced at a time. Youdo
not need to worry about
client requests interfering with each other.<br>
If you choose Apartment-threaded, COM ensures that any instance
of your remote data module services one request at a time. When
writing code in an Apartment-threaded library, you must guard
against thread conflicts if you use global variables or objects
not contained in the remote data module. This is the recommended
model if you are using BDE-enabled datasets. <font size="5">(</font><font
color="#FF0000" size="5"><u>Note that you will need a session
component with its AutoSessionName property set to True to handle
threading issues on BDE-enabled datasets</u></font><font size="5">)<br>
</font><br>
If you choose Free-threaded, your application can receive
simultaneous client requests on several threads. You are
responsible for ensuring your application is thread-safe. Because
multiple clients can access your remote data module
simultaneously, you must guard your instance data (properties,
contained objects, and so on) as well as global variables. This
is the recommended model if you are using ADO datasets.<br>
If you choose Both, your library works the same as when you
choose Free-threaded, with one exception: all callbacks (calls to
client interfaces) are serialized for you.<br>
<br>
</p>