COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => SDK => Topic started by: vrishal on 17 May 2010 02:34:43 AM

Title: get package version via sdk
Post by: vrishal on 17 May 2010 02:34:43 AM
Hi,
   I'm trying to get the version of a specific package via the sdk. The following is what I'm trying to achieve.

1. Check current package version that is deployed
2. Check version of new package in the deployment folder
3. If 2 is newer than 1 then deploy 2 using SDK.

Any help in how to find out the package information (and any of the meta-information about the package) will be highly appreciated.

Thank you

-V
Title: Re: get package version via sdk
Post by: lindero on 21 May 2010 08:16:06 AM
Hello,

the package version don't differ by numbers. They have timestamps within their searchpaths. So you have to compare the timestamps.

hope this helps,
lindero
Title: Re: get package version via sdk
Post by: xiska on 12 Jun 2010 04:30:57 AM
Hi

History versions ot a package have a timestamp in the searchpath but not the current one.
I would try to get the version from the model itself. If you have a suitable value in the model.xml, which is 1:1 in the contentstore, you can use this one. This is just a little xml parsing to make your decision.

Greetings
Title: Re: get package version via sdk
Post by: vrishal on 16 Jun 2010 06:11:27 PM
Quote
Hello,

the package version don't differ by numbers. They have timestamps within there searchpaths. So you have to compare the timestamps.

hope this helps,
lindero

Quote
Hi

History versions ot a package have a timestamp in the searchpath but not the current one.
I would try to get the version from the model itself. If you have a suitable value in the model.xml, which is 1:1 in the contentstore, you can use this one. This is just a little xml parsing to make your decision.

Greetings


Hi,
   Thanks for the reply guys. Although this is an inefficient way for me, I guess there is no other way.

Thanks once again.

-V