Solved

Linking MS Project to Sql Server

Posted on 2011-09-13
5
468 Views
Last Modified: 2013-11-15
Currently we have users using MS Project 2003 & 2007.  Our main business system resides in  a SQL Server 2005 db.  Is it possible to read data, from the SQL Server db inside MS Project?   We are specifically looking to keep dates in sync.  Dates are originally inputted in the business system and PM's enter them in MS Project as well... the trouble is keeping them in sync.  The dates can be volatile...so we are looking for a way to see if we can tie Project to the SQL db and somehow change them automatically in Project?  Sounds impossible to me but it would be wonderful if we could do that somehow...  Thanks.
0
Comment
Question by:snyperj
  • 2
  • 2
5 Comments
 
LVL 12

Expert Comment

by:thausla
ID: 36537754
Hi,

have you thought about Projectserver already? With this ALL project data resides in a SQL Server anyway and Projectserver also offers an API to sync data from external systems e.g. your business system. If you don't want to go this way you need to start some custom development in Microsoft Project's VBA. You can of course read from SQL Server and update dates for specific tasks. However this needs to be triggered by the project manager after opening his/her project as there is literally NO reliable way to "remote control" Project and push the sync.

Hope this helps

Thomas
0
 

Author Comment

by:snyperj
ID: 36538678
Project Server is not an option.

"you need to start some custom development in Microsoft Project's VBA. You can of course read from SQL Server and update dates for specific tasks. However this needs to be triggered by the project manager after opening his/her project"

This is what I am interested in learning how to do in Project.  I am familiar with VBA from Access... just need to be pointed in the right direction.  Where can I find more info?
0
 
LVL 18

Expert Comment

by:Richard Daneke
ID: 36545769
You may elect to store your VBA in Access.   Include the Project reference libraries in your VBA project.   This would permit an Access switchboard to be used to fire the code.
0
 
LVL 18

Expert Comment

by:Richard Daneke
ID: 36545772
FYI, Project is an Access database (Jet)
0
 
LVL 12

Accepted Solution

by:
thausla earned 500 total points
ID: 36557440
Some really good basic stuff on Microsoft Project VBA can be found in http://zo-d.com/blog/archives/programming.html

I think you mostly need something like:
- connect to SQL Server: use the ADODB library in VBA, build a connectstring, create recordsets and run SQL queries to get your data
- run through all tasks in the project using the object model and set the desired task attribute(s) by running through the recordset (or start by running through the recordset, search for the related task and update it)
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

At the office, we’ve started to get serious about organizing what we’re doing. I mean, it was getting to the point where every time I received a phone call, it began with “I know you’re really busy, but…” My boss was taking tasks away from me left a…
"Disruption" is the most feared word for C-level executives these days. They agonize over their industry being disturbed by another player - most likely by startups.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now