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
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