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?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Have a look here, where you should find everything about PDS
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?
Have a look here:

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.
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

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.
ChrisClementAuthor Commented:

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.  :-)

ChrisClementAuthor Commented:

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


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...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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). :-)
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.
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).  

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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Project Management Software

From novice to tech pro — start learning today.