Limitation on AddDependencyRow method in PSI

P

Paul

I am new here, so please forgive if this is in the wrong place. Actually,
forgiveness and then redirection would be great :)

I am trying to use the Project Server Interface to do a large data
conversion from one project scheduling software program to Microsoft Project
Server. This has been confusing so far, but I am working my way through it
slowly. For now, the latest problem I have seems to be some type of
limitation when creating predecessors.

This code works great for the first 36 predecessors, but then it bombs. If
I limit this call to 36 times, everything works great, but when I call it 37
times, the data on the schedule gets hosed. Every activity becomes a 0-day
milestone. Again, as long I only call it 36 times, the predecessors look
great and the task durations are perfect. I ruled it something specifically
being wrong with the 37 predecessor performing some tests.

Is there some limitation on the call of this method?

C# Code:

public static System.Guid linkPredecessorToTask(System.Guid
projectGuid,
ProjectWebSvc.ProjectDataSet
projectDs,
Activity activ,
Predecessor pred)
{
ProjectWebSvc.ProjectDataSet.DependencyRow dependency =
projectDs.Dependency.NewDependencyRow();
dependency.LINK_UID = Guid.NewGuid();
dependency.PROJ_UID = projectGuid;
dependency.LINK_PRED_UID = pred.guid;
dependency.LINK_SUCC_UID = activ.guid;
dependency.LINK_TYPE = (int)
ProjectServerUtilities.convertLinkTypeToPSLinkType(pred.lagType);
dependency.LINK_LAG_FMT = (int)PSLibrary.Task.DurationFormat.Hour;
dependency.LINK_LAG = pred.lag * 8 * 60 * 10;
projectDs.Dependency.AddDependencyRow(dependency);

return dependency.LINK_UID;
}

Thanks so much!

Paul
 
P

Paul

I jumbled my words a bit... I meant to say that I have ruled out something
being wrong with the 37th predecessor.

I did this by taking my source project and deleting a random task before the
activity that creates the 37th predecessor. This allowed 1 additional
predecessor to be created before the data got hosed up. So, it doesn't appear
to be the data. But, what do I know.

Thanks!

Paul
 
D

Dale Howard [MVP]

Paul --

Forgiveness is granted in advance. Please repost your question in the
microsoft.public.project.developer newsgroup, as you are more likely to get
an answer in that newsgroup. Hope this helps.
 
R

Ray McCoppin

Paul: I know there is a limit of like 1000 rows in a dataset update using
the PSI. Is there anyother rows in the dataset that you are updating?

So in code that I have had to do is:
Read the Project Dataset into a dataset as the source of data
Create a second blank dataset no rows
copy the rows I want to update into the second data or create new rows
then us the QueueUpdateProject with second dataset.

This way the dataset that is sent to Project Server Qeue is less than 1000
rows.
The row count limit is for all table in the dataset. You also might want to
keep a running count of the rows in the update dataset and send it to project
server before it gets to 1000.

Hope this helps.
--
Ray McCoppin

http://www.randsmanagement.com
Project Server 2007 Reports
Project Server 2007 Archive tool
SRS gantt charts
 
P

Paul

I am going to do some digging in my code to determine if that is what is
going on. I thought the documentation said it would raise an error if you had
more than 1000 rows in the Project Data Set, and I am not getting an error.
Still, I am going to find out if this is the problem.

Thanks!
paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top