Siebel Object Interfaces Reference > Interfaces Reference > Application Methods >

Login


The Login method allows external applications to log in to the COM Data Server, COM Data Control, Java Data Bean, or CORBA Object Manager and access the Siebel objects. The Login method allows the end user to invoke the Siebel application without being prompted for a login and password. The Login method determines the privileges granted, and the role and responsibility of the end user for that session.

Syntax

Application.Login([connectString,] userName, password)

Argument
Description
connectString
Token-based connect string
userName
Username for login
password
User password for login

Returns

A string containing the error code

Usage

Verify that the Siebel\bin directory is the current directory. To access the Data Control, make sure the default Data Source points to the database that you wish to access and set EnableOLEAutomation to TRUE in your CFG file (this is the default value for the parameter). To access the CORBA Object Manager, EnableCORBA must be set to TRUE.

For information on formatting the connect string, read Connect String.

Used With

COM Data Control, COM Data Server, CORBA Object Manager, Java Data Bean

Example

The Connect string for the COM Data Control is token-based; for example:

host = "Siebel://my_computer/SIEBEL/objsrvr/my_computer" lang = "ENU"

Because most languages use quotes to enclose text strings, you must use quotes inside quotes; for example:

To use the COM Data Control in Visual Basic:

m_dataBean.login("siebel.tcpip.none.none://gateway:gatewayport/enterpriseserver/SCCObjMgr/siebelserver", "username", "password");

To use the COM Data Control in C++:

Login("host=\"siebel//:my_computer/SIEBEL/objsvr/my_computer\" lang = \"ENU\"",""user","password");

The following code sample illustrates how to log in to the server and check for errors.

   Call SiebelAppControl.Login("host=""siebel://gtwy/enterprise/ObjMgr/SiebSrvr""", "SADMIN", "SADMIN")
   
   //Check for errors
      If SiebelAppControl.GetLastErrCode <> 0 Then
         frmMain.txtStatus.Text = SiebelAppControl.GetLasErrText
      Else
         frmMain.txtStatus.Text = "Connected successfully..."
      End If


 Siebel Object Interfaces Reference 
 Published: 18 June 2003