Link Visio drawing to SQL DB

Hi everybody

I need to create a tree describing the hierarchy of the company. I've got Visio Pro 2010 and a SQL Database from a HR program where all workers, there bosses, positions and everything is listed. I aim to link the tree to the database in a way that the tree is updating itself whenever changes are made in the HR program.

So my first question is whether this is possible at all.

I assume it is. So I started to play a little bit arround with it and created a test DB containing several worker's names, an ID, the bosses ID, company name, position and some other information. I successfully managed to import the DB in Visio (Org Chart -> Organization Data -> Import) and it is showing me the tree as I wanted to see it (with the rigth hierarchy and all the information of the workers is rigth). I even managed to add a value for the shape when I give the collumn in the DB the right name (Master_Shape).

But my issue is that the shapes are not linked to the DB. When I make a change in the DB it does not update the tree. When I click on View -> Makros -> Add-Ons -> Visio Extras -> Update Shapes... I get the message "This document does not conatin out-of-date shapes". When I click on View -> Makros -> Add-Ons -> Visio Extras -> Database Refresh i get the error:

Error message

Update Record

Cannot set the database context information

ODBC Error: S1009
[Microsoft][ODBC SQL Server Driver][SQL Server]Database 'Visi' does not exist. Make sure that the name is entered correctly.

I have no idea what 'Visi' does refer to. My database is called VisioPro, the System DSN's name is testvisio and the table is called tbl_employees.

The only way I could figure out right now to update the shapes, contents and structure is to run the iport-wizard after each change. But this is horrible doing this for every change that is made beacuse this creates a new tree every time and the linked copies I created before I need to create agein.

Is there another way maybe to achieve that aim? I googled already but I couldn't really find help to that topic.

Thank you very much.

August 8th, 2015 3:39pm

The org chart does not use an in document copy of the source data to create the diagram (i.e. there are no data recordsets present to mirror the data), so there is no update mechanism available. This does not mean that an imported copy of the data cannot be created and then linked to the existing shapes to create the mechanism you are trying to build after the diagram is built.

al

Free Windows Admin Tool Kit Click here and download it now
August 8th, 2015 9:39pm

Hi  Al Edlund

Thank you for your answer.

I tried linking the Data with the shapes using Data -> Link data to shapes. This does update the shapes when changes are made in the DB to the Content of the shape's date. But this does not update the chart in case of a hierarchy change or in case of a new worker.

Is there a way to update the hierarchy / new workers?

Thank you very much

August 11th, 2015 11:20am

You're correct the hierarchy/formatting of a diagram is fixed once it is created. There are third party products that do not have this restriction. The alternative is to recreate.

Al Edlund

Free Windows Admin Tool Kit Click here and download it now
August 11th, 2015 12:32pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics