Geeks With Blogs
Rodney Vinyard - .NET & SQL Developer When all is said and done, more will be said than done

1) http://blogs.msdn.com/visio/archive/2006/06/13/624391.aspx

1a) http://office.microsoft.com/en-us/visio/HA011822551033.aspx

2) http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.visio.developer&tid=bc85a37f-451c-46c1-b18b-5201dc10ec9a&cat=en_US_7dd7f818-5a21-4dac-938b-9ac892ab60f3&lang=en&cr=US&sloc=&p=1

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

 

Posted on Monday, July 28, 2008 1:03 PM Visio | Back to top


Comments on this post: visio automation

# re: visio automation
Requesting Gravatar...
What a brilliant post, thanks for helping this out.
Left by art on canvas on Nov 16, 2011 3:37 AM

# re: visio automation
Requesting Gravatar...
I put dbo in front of table name (for example dbo.mytable instead of mytable),and it works
Left by Boris on Dec 27, 2012 7:38 AM

Your comment:
 (will show your gravatar)


Copyright © Rodney Vinyard | Powered by: GeeksWithBlogs.net