Solved

WBS with primavera SDK

Posted on 2010-08-27
2
2,023 Views
Last Modified: 2013-11-08
I am using C# 2008, to integrate AutoCad with Primavera. I want to collect WBS through Primavera SDK. I can get projects by

"SELECT wbs_id, wbs_concat_name, wbs_name FROM PROJWBS WHERE node_type = 'PROJECT'"

But, I can not collect WBS s by the following SQLs

"SELECT wbs_id, wbs_concat_name, wbs_name FROM PROJWBS WHERE proj_id = '" + <Project ID>+ "'"

OR,

"SELECT wbs_id, wbs_concat_name, wbs_name FROM PROJWBS WHERE node_type = 'WBS'"

Am I wrong? Is those SQL s are wrong?
0
Comment
Question by:Amitava_Mukherjee
2 Comments
 
LVL 3

Accepted Solution

by:
FryeM earned 500 total points
ID: 33549667
Regarding your first problem query:  Note that the PROJWBS.proj_id field you are using is an integer.  This is the internal foreign key to the PROJECT table record for the project you are interested in.  Here I am assuming that your <Project ID> placeholder is the Project Id value seen within the Primavera application.
Regarding your second problem query:  You should be getting data back BUT for all projects, not just the project you are interested in providing your SCOPE level is set properly (defined in the Programmers Guide).  In order to restrict this to the desired project you must identify the desired project by
(1) JOIN to the PROJECT table for the desired PROJECT.proj_short_name field value equal to your <Project ID> placeholder is the Project Id value seen within the Primavera application.
(2) Identify value in (1) and used directly in you query against PROJWBS.
General comment:  You should really consider using the P6 Web Services API instead of the SDK, assuming you are at least that version.  The current version is P6 Release 7 with Release 8 expected by the end of the year.
0
 

Author Closing Comment

by:Amitava_Mukherjee
ID: 33593465
thanx
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Transparency shows that a company is the kind of business that it wants people to think it is.
Online collaboration is quickly becoming embedded in the workplace, and its benefits are tangible. See what the current landscape looks like and what the future holds for collaboration tools and the future of work.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question