Wednesday, June 15, 2005

Siebel DataControl Sample Code

Sample Code which uses Siebel data Control to connect to Siebel. Its
available where ever COM objects can be consumed (Java, PHP etc etc).
Change UID and PWD. Check Bookshelf for more documentation on other
properties of DataControl…

[Vbscript]

Dim errCode
Set SiebelApplication = CreateObject("SiebelDataControl.SiebelDataControl.1")
SiebelApplication.Login
"host=""siebel.TCPIP.NONE.NONE://APPSERVER:2321/siebel/eCommunicationsObjMgr_enu""",
"UID","*****"
errCode = SiebelApplication.GetLastErrCode()
If errCode <> 0 Then
ErrText = SiebelApplication.GetLastErrText
Msgbox ErrText
Else
msgbox "Connected"
End If

[Jscript]
var errCode;
SiebelApplication = new ActiveXObject("SiebelDataControl.SiebelDataControl.1");
var ConnStr="host=\"siebel.TCPIP.NONE.NONE://APPSERVER:2321/siebel/eCommunicationsObjMgr_enu\"";
var UID="ROY";
var PWD="*****";
WScript.Echo(ConnStr + UID + PWD);
SiebelApplication.Login(ConnStr, UID,PWD);
errCode = SiebelApplication.GetLastErrCode()
if (errCode != 0)
{
ErrText = SiebelApplication.GetLastErrText();
WScript.Echo(ErrText);
}
else
{
WScript.Echo("Connected");
}

3 Comments:

Anonymous Anonymous said...

Depending on the siebel release the name of the COM object might be slightly differnet. Check your registry..

November 30, 2005 2:58 PM  
Blogger Unknown said...

This comment has been removed by the author.

February 05, 2011 5:14 PM  
Blogger Unknown said...

Although your application might have a public URL, the "APPSERVER:2321" referred in the sample code is actually the gateway ip. It is not likely that a company leaves it open and reachable from anywhere, making the COM data control solution usable only internally.

February 05, 2011 5:15 PM  

Post a Comment

<< Home