Org Chart Wizard Automation in Visio 2003 with SQL Server

A

Archana PB

Hi,
I am trying to programatically automate the Org Chart Wizard(Visio 2003) in
C#. But when I attempt to connect to a SQL Server 2005, I get an error
message- "Invalid data. Your data file is empty".
I tried programming Excel file to be the data source, it worked fine.
I manually ran the wizard using the SQL data source, it worked fine.
But when I try to code it to work with the same SQL Server data source, I
get this error. It is able to connect to the data source but it is not able
to connect to the database.
I tried changing the name of the datasource, changing it to a different
server, tried connecting it to different databases but it does not work for
any database.

The code for connecting to database is-

commandPart = "/DATASOURCE="
+ formatHelper.StringToFormulaForString(data_source_name);
commandPart = commandPart + "," + "/TABLE=";
commandPart = commandPart +
formatHelper.StringToFormulaForString(Table_containing_information);
commandPart = commandPart + "," + "/DBQUALIFIER=";
commandPart = commandPart +
formatHelper.StringToFormulaForString(database_name);
chartWizard.Run(command + commandPart);


I tried running the orgwiz.exe with command line arguements, but again it
can connect to the data source but it says "Invalid data. Your data file is
empty"
Please help.
Thanks,
Archana
 
N

Nirenjan

Hi
Iam looking for some source code to connect from excel ( Org Chart
Wizard),can you send me the code?

Nirenjan
 
B

Barb Way

If you download the Visio 2007 SDK , you can search the Code Samples to
find "Organization". There are samples of connecting to both Exchange
Server and to an Excel worksheet, and the examples are in VB, VB.Net, and
C#.

Any code samples around the Org Chart solution should function in both
Visio 2003 and 2007 equally well, as there was no change in the automatable
features between the two versions.

Barb Way
Product Support - Visio
Microsoft Corporation
[This posting is provided "As Is" with no warranties, and confers no
rights.]
--------------------
Thread-Topic: Org Chart Wizard Automation in Visio 2003 with SQL Server

Hi
Iam looking for some source code to connect from excel ( Org Chart
Wizard),can you send me the code?

Nirenjan
 

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