Registering an Active Server Object

From RAD Studio
Jump to: navigation, search

Go Up to Creating an Active Server Page Index

You can register the Active Server Page as an in-process server or an out-of-process server. However, in-process servers are more common. An in-process automation server is a set of COM Automation Objects for connecting to databases, executing SQL statements and PL/SQL blocks, and accessing the results. In-process automation objects are inside of .DLLs; out-of-process automation servers are applications (.EXEs).

Note: Registering an Active Server Page object adds an entry to the Windows system registry. Registry entries associated with objects can only be unregistered using code inside the proper associated object. That is, if the object no longer exists, it cannot be used for unregistering. Thus the registry can become cluttered with "orphaned" registrations.
  • Unregistering is important in several cases:
    • Before removing an Active Server Page object from your system, you should unregister the object.
    • If you register an Active Server Page object during application development but subsequently decide not to save the application, you should always unregister the object before you abandon the application.

Registering an in-process server

To register an in-process server (DLL or OCX), choose either:

  • Run > ActiveX Server > Register
  • Run > ActiveX Server > Register for Current User

To unregister an in-process server, choose Run > ActiveX Server > Unregister . This unregisters any server, including those that were registered per-user.

Note: The IDE, being a 32-bit process, cannot register 64-bit in-proc/DLL servers (32-bit processes cannot load 64-bit DLLs). To register 64-bit in-proc servers, you must use the 64-bit version of TRegSvr.exe, located in $(BDS)\bin64\TRegSvr.exe.

Registering an out-of-process server

To register an out-of-process server, run the server with the /regserver command-line option. (You can set command line parameters on the Run > Parameters dialog box.)

To unregister an out-of-process server, run the server with the /unregserver command-line option.

See Also