LoadObjects Method for an Application

The LoadObjects method starts the COM Data Server. This method must be the first call to the COM Data Server. This method returns the following information:

  • If the COM Data Server starts successfully, then the LoadObjects method returns nothing.

  • If the COM Data Server does not start successfully, then the LoadObjects method returns an error.

Format

Application.LoadObjects(absoluteCFGfileName)

The following table describes the arguments for the LoadObjects method.

Argument Description

absoluteCFGfileName

The path and name of the Siebel application configuration (CFG) file to open. For example:

C:\Siebel\8.1\Server\BIN\ENU

As an option, to identify the data source you can append the CFG file string with the data source, separated by a comma. For example:

C:\Siebel\8.1\Server\BIN\ENU\siebel.cfg,ServerDataSrc

If you do not specify the data source, then the LoadObjects method assumes the data source is local.

Usage

Prior to calling the LoadObjects method, you must modify the current folder to the Siebel\bin folder.

If you use the COM Data Server, then the COM client cannot create multiple connections to the COM Server. For example, a second attempt to call the LoadObjects method causes an error message that is similar to the following:

The object definition manager has already been initialized.

You must restart the COM client before you can make another successful connection. Use COM Data Control instead.

Used With

COM Data Server

Examples

The following example uses COM Data Server:

Private Sub LoadConfig_Click()
   Dim errCode As Integer
   LoadConfig.Enabled = False
   SiebelApplication.LoadObjects "C:\Siebel\8.1\Client_2\BIN\ENU\uagent.cfg", _
      errCode

   If errCode = 0 Then
      ConfigOK = 1
   End If

   Status.Text = SiebelApplication.GetLastErrText
End Sub