Siebel Object Interfaces Reference > Customizing Siebel Object Interfaces > Accessing a Siebel Object Interface >

Accessing COM Data Control

This topic describes how to access COM Data Control. A call to COM Data Control is in process. For more information, see How Siebel CRM Uses Memory and Resources with the Mobile Web Client Automation Server.

To access COM Data Control

  1. Install COM Data Control.

    Use the Siebel Enterprise Server Installer. Make sure the EAI Siebel Connectors option contains a check mark. For more information, see the Siebel Installation Guide for the operating system you are using.

  2. Start Microsoft Visual Basic.
  3. Choose Standard EXE.
  4. Choose the Project menu, and then the References menu item.
  5. In the References dialog box, in the Available References window, make sure the Siebel Business Object Interfaces Type Library item contains a check mark.
  6. To open the Object Browser, click OK.
  7. Determine the correct format for the object interface method.

    You must use the CreateObject method and the Login method. You cannot use an object interface method that returns an active Siebel object because no Siebel objects are currently active. You must use your own Siebel objects.

  8. Verify that you can view the Siebel objects.
  9. Add the required code.

    For more information, see Example of Accessing COM Data Control.

Example of Accessing COM Data Control

The following example includes the code you use in Microsoft Visual Basic 6.0 to access COM Data Control:

Sub CreateDataControl()
Dim errCode As Integer
Set SiebelApplication = CreateObject("SiebelDataControl.SiebelDataControl.1")
SiebelApplication.Login "host=""siebel://hostname/EnterpriseServer/AppObjMgr""", "CCONWAY", "CCONWAY"
errCode = SiebelApplication.GetLastErrCode()
If errCode <> 0 Then
   ErrText = SiebelApplication.GetLastErrText
   SiebelApplication.RaiseErrorText ErrText;
   Exit Sub
End If
set OpptyB0 = SiebelApplication.GetBusObject("Opportunity",errCode)
set OpptyBC = OpptyBO.GetBusComp("Opportunity", errCode)
End Sub

To determine values to substitute for the variables in the login string, see Setting the Connect String.

Example of Using Siebel Server ASP Script to Access COM Data Control

To set off an ASP script in HTML code, you use the following format:

  • To indicate the beginning of the ASP script, you use the less than symbol and the percent symbol (<%).
  • To indicate the end of the ASP script, you use the percent symbol and the greater than symbol (%>).

The following example code starts COM Data Control from a Siebel Server ASP script:


   Dim SiebelApplication, BO, BC, ConnStr, logstat
   Dim strLastName, strFirstName, errCode, errText

      Set SiebelApplication = CreateObject("SiebelDataControl.SiebelDataControl.1")

   ' Test to see if object is created
   If IsObject(SiebelApplication) = False then
      Response.Write "Unable to initiate Siebel Session.
      connStr = "host=" & Chr(34) & "siebel.tcpip.none.none://hostname:2321/EntServer/ObjMgr" & Chr(34) & " lang=" & Chr(34) & "lang" & Chr(34)
      logstat = SiebelApplication.Login ConnStr, "SADMIN", "SADMIN"

      response.write("Login Status: " & logstat)
      Set BO = SiebelApplication.GetBusObject("Employee")
      Set BC = BO.GetBusComp("Employee")
   End If


Siebel Object Interfaces Reference Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.