Database table append

C

Chris

I am trying to include VBA code to extract project summary task information
from the active project and append to a database table during the before_save
event. Any thoughts or assistance appreciated.
 
A

Adam Behrle

Hi Chris,

Couple of ideas to explore:
- In VBA you could connect to your database you mentioned using ADODB,
iterate through tasks and export/update info that way.
- Instead of catching the before_save event, you could have a button
or hotkey that runs a macro that saves the project into an access
database. You could then consume the data there.
- Connect to the mpp file directly using ODBC (the mpp acts as a read-
only database).

Good luck,

Adam Behrle
QuantumPM
 
C

Chris

Adam-

Thanks for the suggestions. I got the ADODB option to work with an INSERT
query.
 
M

Mark VII

Adam Behrle said:
- Connect to the mpp file directly using ODBC (the mpp acts as a read-
only database).

Hi Adam --

Can you elaborate a bit on connecting to an MPP file via ODBC? I need to
read the content of an MPP file on my local machine like it's a databse
table. If I can do this via ODBC, it will save me a ton of time vs. other
alternatives I've considered.

Also, where do I find an ODBC driver for MS Project? I've searched around
and haven't found one.

Thanks,
Mark
 
A

Adam Behrle

Hi Mark,

Instead of just saying ODBC I should have called out OLE DB.

In a Project 2003 installation, you can read about it in an HTML file
at Program Files\Microsoft Office\OFFICE11\1033\PJOLEDB.HTM

This is mentioned in the MSDN article titled "Getting Started:
Developing with Project 2003":
http://msdn2.microsoft.com/en-us/library/aa140134(office.10).aspx

Note I haven't confirmed if this is still available or not in Project
2007.

Hope that helps,

Adam
 

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