• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 579
  • Last Modified:

Updating Project 2003 with Project Server 2003 PDS

I am writing a c# app that will update a project based on a SQL trigger.  My problem is that it does not seem that PDS has UpdateProject or UpdateTask methods.   I can create/delete project and tasks but I cannot up date them using PDS.   How do you update Project and Task data for Project 2003 using PDS?

Thanks.
0
ChrisClement
Asked:
ChrisClement
  • 5
  • 4
  • 2
2 Solutions
 
BembiCEOCommented:
Have a look here, where you should find everything about PDS
http://support.microsoft.com/kb/823530/en-us
0
 
ChrisClementAuthor Commented:
Thanks, but it doesn't really answer my question.  I need to be able to update project info and tasks from PDS, but I am not finding methods to do this.  So is there no way to update project and tasks using PDS?
0
 
BembiCEOCommented:
Have a look here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/pjsdk/html/pdsAboutThePDSReference.asp

If you have a closer look on PWA, you will see, that the missing API calls, like updating regular task fileds are also missing in OWA. I assume, that this is by design for two reasons:

1.) If you would be able to handle most of the project management work by calling this API, you would be able to replace MS Project Pro, which brings the most earnings for MS. You can update a lot of things, but not something essential than tasks. It is similar in PWA, where you also can add tasks to a personal task list, you can shift them into a project, but you can neither delete nor change then. On the other hand, you can handle all of the enterprise fields options.

2.) MS Project Pro creates the timephase data and is doing the scheduling. If you would change a task field like duration or start / end date, nothing would happen until MSP Pro recalcs the timephase data. Timephase data can be written to a table, but are created on the fly. This is also the reason, why you have explicitely timephased functions within MSP (VBA) and you are also mission funktions to directly access it.

Possibly workarounds:
1.) If you are able to host the information, you want to change within Custom Enterprise fileds, you should be able to change them using PDS / SOAP
2.) You can directly write into the MSP_TASKS table, if the fields are there, not using PDS but using a direct SQL server connection
3.) You may call MSP Pro to update the data

Hope this helps.
0
Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

 
MSProjectGeekCommented:
PDS sucks for the reasons you've noted.  

I use VBA in Project Professional.  It takes some getting into but you can open projects, add tasks, basically do anything you want, from within the VBA environment.  This approach also has the advantage that you do all the security authentication when you connect to Project Server using the fat client.  More advanced is the ability to create user-forms that open from toolbar buttons so that the user gets indications of what's happening, progress bars, etc.

Although you'll have to add an ADO reference first, you can also connect to SQL databases and read and write data from/to SQL databases using the VBA language.
0
 
ChrisClementAuthor Commented:
MSProjectGeek,

You can do all that in C# as well.  I didn't get into the whole story about what we are having to try to do as I was hoping for a simple answer (that evidently doesn't exist).  What we have to do is essentially save any changes that are made in Project to a second database server (oracle).  The requirements we have state that we have to do this in realtime and we cannot use replication (political reasons).   So using the PDS with its autopublish functionality was the chosen method to do this.  Obviously wasn't made for this, but we are trying to pound that square peg into the round hole anyway.    

If you have any alternative methods of accomplishing this....I'm all ears.  :-)

Chris
0
 
ChrisClementAuthor Commented:
Bembi,

Thanks for the info.  Regarding workaround #2, I read in a whitepaper on MSDN that manipulating the data directly could cause corruption.  MS BS?

Thanks.

Chris
0
 
MSProjectGeekCommented:
If you read and write data to / from the MS Project Database then you do run the risk of causing corruption and I would not recommend it unless you REALLY know what you are doing - I do it occasionally - it's not MS BS.

But that's not really what I was suggesting - from Project VBA you can do all kinds of things, see if this gives you an idea....

<establish ADO connection to SQL database table containing names of projects to be created>
<read name of new project into MyFileName>

Real VBA Code line>>> FileSaveAs Name:=MyFileName, UserId:="", DatabasePassWord:="", FormatID:=""

This is obviously a gross over-simplification, you'd have to add all the code to:

Check if there was even an active project
Check if the project name already existed (and open it if that's what you wanted to do)
Open a template file (possibly depending on parameters in your SQL database table)
Add tasks
Make project assignments
Save and close project

The Project VBA commands include everything you can do in PDS plus a whole lot more - basically everything you can do in the Fat client.

As a test, try starting the Macro Recorder, then perform a set of activities like open a project, add a task, save the project.  Then stop the macro recorder and go look at the Macro created in the VBA editor.  This is a good starting place but there is a LOT to learn and many pitfalls.

This is an niche area of expertise I have if you need help...
0
 
ChrisClementAuthor Commented:
Aight, Geek.  I'll go and try to digest all this and post more questions if I get stuck.  Thanks to both you and Bembi for the help.  I'm going to split the points between you.

Talk to you soon (probably REAL soon). :-)
0
 
MSProjectGeekCommented:
I just re-read you comments.

I have working examples of integrating Project Professional 2003 (connected to Project Server 2003) with remote databases.  This functionality includes.

- Reading an import file from a SQL table and creating new Projects on the server that are created from Enterprise templates
- Automatic assignments made from the names provided in the SQL table
- User forms showing progress bars as the queue is imported - the forms test the group membership of the logged on resource - if the resource is not a member of the Admin group, they don't get to run the form - this actually calls a PDS command and parses the returned XML code
- error trapping and application of business rules
- Changes in the Project database trigger messages to remote systems to update data
- SQL sprocs that act on the Project Server database for unavailable functions and reporting

In other words, I can make Project Pro do what you want.
0
 
ChrisClementAuthor Commented:
Thanks, sounds like there is a price tag at the end though.   :-)    Unfortunately, this project is for the government and not to say they are ultra-cheap...but they're not going to buy any third party products (hint: ultra-cheap).  

0
 
MSProjectGeekCommented:
Cheap old Government eh? I don't work for free but my rates are reasonable - if this is something I can do in a hour then that can be free within the spirit of Experts Exchange.  From what you've said it is very likely more complicated than that.  If you're willing to share the requirements with me in more detail then I can obviously give you a better idea of how I would approach it and give a guestimate of time.  Email me at Ted@Portfoliopm.com if you are interested.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 5
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now