If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Change the connection string for a Analysis cube using SDK

Started by b11nnl, 31 Oct 2007 07:13:11 AM

Previous topic - Next topic

b11nnl

Hello,
Please can someone help with the follow.  Really need some help  :(

I have a Analysis service cube as a datasource in Cognos Connection. How can I change the connection string from one to another using SDK? Im really struggling and if someone can help me out I will really appreciate it. Had the following so far but its still incorrect.


import com.cognos.developer.schemas.bibus._3.*;

public class DBSignOn {

            public CognosReportNetServiceLocator service = null;
            public CognosReportNetPortType  oCrn    = null;
            public static void main(String[] args)
            {
                        final String sDbCatalogDev = "^User ID:^?Password:;LOCAL;OL;DBInfo_Type=MS;Provider=SQLOLEDB;User ID=%s;Password=%s;Data Source=localhost;Provider_String=Initial Catalog=GOSL;@COLSEQ=";

                        final String sDbCatalogProd = "^User ID:^?Password:;LOCAL;OL;DBInfo_Type=MS;Provider=SQLOLEDB;User ID=%s;Password=%s;Data Source=localhost;Provider_String=Initial Catalog=gosales;@COLSEQ=";

                        String sDbCatalog = null;
                        PropEnum props[] = {PropEnum.defaultName, PropEnum.user,
                              PropEnum.credentials,PropEnum.searchPath, PropEnum.version,
                                                PropEnum.consumers, PropEnum.connectionString, PropEnum.credentialNamespaces ,
                                                PropEnum.permissions, PropEnum.policies };
             }
}

Thanks






COGNOiSe administrator

From the code it doesn't look like you've connected nor lgged in to Cognos Connection, and there is no update method used either. IS this code complete or do you expect one of us to write for you? How much of an experience with JAVA and SDK do you have?