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.
Else
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
%>