Project Unique ID

A

AJ

Hi All,
I am extracting data from multiple projects through VB
code and somehow the Project UniqueID always comes as -1.
Could anyone please help me urgently.

Thanks
 
A

AJ

Hi John,
I am extracting like this:
strSQL = "SELECT ProjectUniqueID,
AssignmentUniqueID,ResourceUniqueID,TaskUniqueID," & _
AssignmentResourceName,AssignmentTaskName,AssignmentRemaini
ngWork,Project,AssignmentActualWork," & _
FROM Assignments WHERE AssignmentUniqueID > 0 and
ResourceUniqueID > 0" & _
ORDER BY AssignmentTaskID ASC"

Please help urgently..

Thanks
AJ
 
J

John

AJ,
Sorry, you have exceeded my realm of knowledge. I thought you were
perhaps using VBA. Hopefully someone else with the right knowledge can
assist.

John
 
R

Richard Trappen

AJ,

How are your projects stored? Are they individual files, a consolidated
file, or in a database outside of the project environment?

Rick
 
A

aj

Hi,
There multiple project files from which I read the data
one by one and store the data into few tables I created.
This is where the unique ID is important because every
project plan generates the same -1 projectuniqueID for all
the files I read in. Any thoughts on this or a better way
of extracting the data would be highly appreciated.

Thanks
Aj
 
R

Richard Trappen

aj,

From what I can gather, you have individual project files that are being
accessed via OLE DB in order to populate some tables in some type of
database (access? sql2000?). Looking at your SQL statement strSQL, I
was able to identify and confirmed all the fields within the native
Assignments table except for the first and that one being the
ProjectUniqueID. The native Assignments table uses a composite key
utilizing the "Project", ResourceUniqueID", and TaskUniqueID" fields to
keep things straight. You can set your database table(s) up the same
way utilizing the three fields to track which record goes to which
project. Are you using a look-up table to populate your connection
string with the different project names? This is another identifier
that can be used to keep track of things. Good luck.

Cheers!

Rick
 
G

Guest

Hi,
When the VB application starts, I load a left list box
with all the plans. User can select any number of plans in
the right list box and press extract. At this moment I
open multiple connection in connection array based on the
number of plans selected in the right list box. Then I
pass the connection along with the index to open each plan
one at a time and populate the tables in SQL Server 2000.
So if there are 10 plans, data from each plan is extracted
and inserted into the tables but everytime the Project
UniqueID is -1 for all the plans. Now the question is when
I am building my query in SQL Server, I have no way of
distinguishing the data from all these plans because the
Project UniqueID is -1 for all the plans.

You mentioned something about lookup table, I have never
used that, could you please tell me how. Or if you know
any other way, please let me know.

Thanks

aj
 
R

Richard Trappen

aj,

The quick and dirty solution is to use the field "project" as your
primary key to differentiate between the projects. If all of your
projects are stand-alone (individual vice sub) and they all reside in
the same directory then they will all have unique project names. If
this is the case then using "project" as your PK will solve your
problem. If this doesn't fit the bill, let me know how your tables are
set up in sql2K.

Cheers!

Rick
 
D

DavidC

The field for the project identifier is PROJ_ID in
MSP_PROJECTS. You are selecting the right filed are you?

The projects are all numbered from 1 and up so there
should not be a negative number.

Regards
DavidC
 
A

aj

Thanks a lot!!

I have a quick question. Where can I capture assignmnet
remaining time field data. Please help urgently.

Thanks
Aj
 

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