|
|
|
date: Fri, 27 Jun 2008 13:06:03 -0700,
group: microsoft.public.visio.developer
back
Org Chart Wizard Automation in Visio 2003 with SQL Server
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
date: Fri, 27 Jun 2008 13:06:03 -0700
author: Archana PB Archana
RE: 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
"Archana PB" wrote:
> 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
date: Mon, 4 Aug 2008 11:28:00 -0700
author: Nirenjan
RE: Org Chart Wizard Automation in Visio 2003 with SQL Server
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs26 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#.
\par
\par 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.
\par
\par Barb Way
\par Product Support - Visio
\par Microsoft Corporation
\par [This posting is provided "As Is" with no warranties, and confers no rights.]
\par \pard\li720 --------------------
\par Thread-Topic: Org Chart Wizard Automation in Visio 2003 with SQL Server
\par
\par Hi
\par Iam looking for some source code to connect from excel ( Org Chart
\par Wizard),can you send me the code?
\par
\par Nirenjan
\par
\par "Archana PB" wrote:
\par
\par > Hi,
\par > I am trying to programatically automate the Org Chart Wizard(Visio 2003) in
\par > C#. But when I attempt to connect to a SQL Server 2005, I get an error
\par > message- "Invalid data. Your data file is empty".
\par > I tried programming Excel file to be the data source, it worked fine.
\par > I manually ran the wizard using the SQL data source, it worked fine.
\par > But when I try to code it to work with the same SQL Server data source, I
\par > get this error. It is able to connect to the data source but it is not able
\par > to connect to the database.
\par > I tried changing the name of the datasource, changing it to a different
\par > server, tried connecting it to different databases but it does not work for
\par > any database.
\par >
\par > The code for connecting to database is-
\par >
\par > commandPart = "/DATASOURCE="
\par > + formatHelper.StringToFormulaForString(data_source_name);
\par > commandPart = commandPart + "," + "/TABLE=";
\par > commandPart = commandPart +
\par > formatHelper.StringToFormulaForString(Table_containing_information);
\par > commandPart = commandPart + "," + "/DBQUALIFIER=";
\par > commandPart = commandPart +
\par > formatHelper.StringToFormulaForString(database_name);
\par > chartWizard.Run(command + commandPart);
\par >
\par >
\par > I tried running the orgwiz.exe with command line arguements, but again it
\par > can connect to the data source but it says "Invalid data. Your data file is
\par > empty"
\par > Please help.
\par > Thanks,
\par > Archana
\par \pard
\par
\par }
date: Wed, 06 Aug 2008 15:33:42 GMT
author: (Barb Way)
|
|