Solved

WBS with primavera SDK

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you are using Scrum Framework or another agile process, a retrospective may be part of it. Does your team perform retrospectives? Are you getting value from your retrospectives? I see a common anti-pattern when people conduct a retrospective f…
Agile and Scrum have almost become synonymous. Have you wondered what's the difference? Scrum is just one way to be Agile. It is the most popular which leads to the common confusion. Agile actually refers to a philosophy shared by group of developme…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now