Solved

WBS with primavera SDK

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

5 Tips For Long Jumpers: A Sprinter's Approach to Agile Software Development As a Sprinter, long jumping — applying momentum to progress by leaps and bounds — is a natural and complementary skill. In the following article, I will share my five ti…
It was Monday morning and while heading to work those familiar feelings of frustration began to rise: How was I ever going to get my yard work done?! At the end of every weekend I discovered that I spent more time trying to decide what to work on th…
A short film showing how OnPage and Connectwise integration works.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

914 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

16 Experts available now in Live!

Get 1:1 Help Now