MS Project Interop for reading .mpp file.

A

Aj Singh

I am using MS Project 2003 interop and want to dump all data from .mpp file
to database.
I have created database using Microsoft MS Project 2003 script provided in
setup. (Using Oracle 9i as the database.)

Now i am getting all the values from interop object model
e.g. MSProject.Project properties like ActualStart,ActualWork etc.

I am unable to map these properties to database columns.
e.g MSP_PROJECTS table has only 69 columns and
MSProject.Project properties are around 274.

moreover i am not clear if properties are giving me all the required values
as per table.

Query
1.If above approach of extraction is right ?
2.If yes i am looking for mapping for same.
3.Is there any other way to do that.

Using C# .net 2.0
Note: I cannot go with OLE DB, ODBC , mdb approaches for MPP extraction of
data.

Thanks & Regards,
Ajay Singh
 
A

Aj Singh

Hi Rod,
below i have pasted a list of columns that are entered from the MS Project,
and then there are four tables for Project, Tasks, Resources and Assignment.
If you copy and paste it in the excel you get it in the format that i had
pasted.
--------------------------------------------------------------------------
MS PROJECT COLUMN NAMES MSP_PROJECT MSP_TASKS MSP_RESOURCES MSP_ASSIGNMENT

BASELINE DURATION -- TASK_BASE_DUR -- --
BASELINE FINISH -- TASK_BASE_FINISH -- ASSN_BASE_FINISH
BASELINE START -- TASK_BASE_START -- ASSN_BASE_START
BASELINE WORK -- TASK_BASE_WORK RES_BASE_WORK ASSN_BASE_WORK
BCWP -- TASK_BCWP RES_BCWP ASSN_BCWP
BCWS -- TASK_BCWS RES_BCWS ASSN_BCWS
--------------------------------------------------------------------------

I have only pasted a sample and not the whole list, my problem is that there
is still so many entries that have to be mapped to the actual columns in the
mpp tables.
Looking forward for your reply.
Thanks for your help.

Regards,
Ajay Singh
 
R

Rod Gill

Looking at the pjdb.htm file, those are all exported when saving as a
database from Project 2003. You can't save as database in 2007. You don't
need a script, just save as to an ODBC source (in your case Oracle).

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
A

Aj Singh

Hi Rod,
By this as i understand, does this mean that we are taking a wrong approach
(MS Project Interops) and we should be looking for saving the mpp file using
the ODBC programmatically (C# .net 2.0) please confirm.

Thanks and Regards,
Ajay Singh
 
R

Rod Gill

Your choice. Saving as ODBC is not supported in 2007. So either keep a copy
of 2003 for ever to export projects to db or you need to use code to write
data to database from a project Open in Project client.

File, Save as in Project saves all data as defined in the pjdb.htm file.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
A

Aj Singh

Your suggestion of saving as ODBC sounds a wonderful idea, as it saves all
the data in the specified database automatically, which will solve our
problem of dumping the data from mpp file to database, however i tried
looking ways and went through the 2003 interop to see if i could do that
programmatically using C# if its a possibility.

We cannot ask user to manually save using ODBC, we have to do it
programmatically.
Would really appreciate if you could let me know if, saving to ODBC
programmatically is possible or not, and if so, then can you give a link or
sample code or some pointers for the same.

Thanks a lot for your help.

Regards,
Ajay Singh
 
A

Aj Singh

Hi Rod,
I have been able to save it to the oracle database using the ODBC. I am
using the ODBC approach to dump all the data in the Oracle database. My
issues has been resolved now.

I appreciate the time and help provided.

Thanks & Regards,
Ajay Singh
 

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