%@ page import = "com.crystaldecisions.sdk.occa.infostore.*,
com.crystaldecisions.sdk.framework.*,
com.crystaldecisions.sdk.exception.SDKException,
com.crystaldecisions.sdk.properties.*,
java.util.*"
%>
<%
IEnterpriseSession enterpriseSession = null;
try
{
String userName = "administrator";
String password = "";
String cmsName = "localhost";
String authType = "secEnterprise";
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(userName, password, cmsName, authType);
IInfoStore infoStore = (IInfoStore)enterpriseSession.getService("", "InfoStore");
String query = "select top 1000000 si_id, si_name, si_scheduleinfo from ci_infoobjects where si_cuid in ('CUID1','CUID2','CUID3')";
IInfoObjects oInfoObjects = (IInfoObjects)infoStore.query(query) ;
for(int i=0; i< oInfoObjects.size(); i++)
{
IInfoObject oInfoObject = (IInfoObject) oInfoObjects.get(i);
if(oInfoObject.getSchedulingInfo() == null)
{
out.println(oInfoObject.getID() + " schedulinginfo null
");
}
else if(oInfoObject.getSchedulingInfo().properties() == null)
{
out.println(oInfoObject.getID() + " schedulinginfo properties null
");
}
else if(oInfoObject.getSchedulingInfo().properties().getProperty("SI_DESTINATION") == null)
{
out.println(oInfoObject.getID() + " si_destination does not exist
");
}
else
{
IProperties propBag = (IProperties)oInfoObject.getSchedulingInfo().properties().getProperty("SI_DESTINATION").getValue();
if (propBag != null)
oInfoObject.getSchedulingInfo().properties().remove("SI_DESTINATION");
}
}
infoStore.commit(oInfoObjects);
out.println("committed...exiting");
}
catch(SDKException sdkEx)
{
out.println(sdkEx);
}
finally
{
if(enterpriseSession != null)
enterpriseSession.logoff();
}
%>