Solved

WBS with primavera SDK

Posted on 2010-08-27
2
2,026 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifiā€¦
A simple overview of the possibilities of using technology for project management.

830 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