Examples of Using the Connect String

This topic includes examples of using the connect string.

Example Connect String for COM Data Control in Server Mode

The following example includes a connect string for COM Data Control that operates in server mode:

   'COM Data Control : SERVER Mode
   lstr = "host=" + """siebel://frashid/Siebel/SSEObjMgr_enu"""
   'Format of the connect string is
   '"host=" + """siebel://host/enterprise/App. Object Mgr_lang"""
   lng = "lang=" + """ENU"""
   retval = siebDataCtl.Login(lng + lstr, "username", "password")

Example Connect String for COM Data Control in Local Mode

The following example includes a connect string for COM Data Control that operates in Local Mode:

   'COM Data Control : LOCAL Mode
   lstr = "cfg=" + """C:\Siebel\8.1\Client_2\BIN\ENU\siebel.cfg,ServerDataSrc"""

   'Format of the connect string is
   '"cfg=" + """Absolute path of the CFG file, DataSource"""
   'Datasource = ServerDataSrc or Local or Sample
   lng = "lang=" + """ENU"""
   retval = siebDataCtl.Login(lng + lstr, "username", "password")

If in Local Mode, then COM Data Control must reside on the same computer as the Siebel Mobile Web Client.

Example Connect String for COM Data Control When Using Siebel VB

The following example includes a connect string for COM Data Control that uses Siebel VB. The Char(34) code indicates a double quote:

ConnStr = "host =" & char(34) & "siebel://HOST/ENTERPRISE_SERVER/SCCObjMgr_enu/
SIEBEL_SERVER" + char(34) & " Lang = " & char(34) & "LANG" & char(34)