Visio - Organization Chart - Automate Sql Server

R

Roberto Franco

Hi Group

AnyBody know how to use addon "OrgcWiz" against Sql Server?. I only need to
know how to fill parameters of the followings commands:

DATASOURCE, TABLE and DBQUALIFIER.

Thank you very much
Robert
 
C

Chris Roth [ Visio MVP ]

The Wiz allows you to hook to an ODBC data source. Can you create an ODBC
source for your Sql data?

Once you're past that, I'm pretty sure the Wiz lets you map Shape data to DB
Fields...

--

Hope this helps,

Chris Roth
Visio MVP
 
A

Al Edlund

yup, sql supports odbc. go to control panel, admin, odbc and select either
user dsn or system dsn.
al
 
R

Roberto Franco

Thank very much Chris

I have created the ODBC for Sql data with NT Authentication and the
parameters for Wiz as follow:

strCommand = "/DATASOURCE=" & sDataSourceName & " ,TABLE=" &
"dbo.organization" & " ,DBQUALIFIER=" _
& " /SHOW-DIVIDER-LINE " _
& " /NAME-FIELD=Name " _
& " /UNIQUEID-FIELD=Name " _
& " /MANAGER-FIELD=Reports_To " _
& " /DISPLAY-FIELDS=Name" _
& " /CUSTOM-PROPERTY-FIELDS=Name" _
& " /SYNC-ACROSS-PAGES " _
& " /HYPERLINK-ACROSS-PAGES " _
& " /PAGES=" & chr(34) & "Rob Castillo" & chr(34)

But I still received error message "Invalid Data.Your Data File is empty." I
also have tested it against excel file with the same date without problem.
I really don't know what to put in DBQUALIFIER parameter.

May be that's the problem

Aclaration: I also have tested it insideVisio Program with the same ODBC for
Sql with success (No error message).
 
A

Al Edlund

ok as a test
use enterprise manager to create a database called TEMPDB
use DTS to import the sample excel spreadsheet ORGDATA.XLS
rename the SHEET1$ table to orgdata (for simplicity)
--------
control panel
ADMIN
ODBC
SYSTEM DSN - ADD
SQL SERVER - OK
name of connection ORGDATA (for simplicity)
description ' whatever
authentication - NT
change default db to TEMPDB
test connection
-------
visio 2003 org chart wizard
odbc compliant
select orgdata connection
select dbo.orgdata table
rest of it is use defaults

works fine for me...
Al
 
R

Roberto Franco

Thank you Al

My problem is that I wont to automate the process of getting the data for
the Organization Chart from Sql Sever. I'd like to do it with VBscript ( Not
using Visio 2003 program).

Any Idea on how to fill parameters for : DATASOURCE, TABLE and DBQUALIFIER.?
 
A

Al Edlund

That doesn't sound at all like a visio problem.
What are you using for the 'container'? The good news is that vbscript is
very close to vb(a). How experienced are you at database (comfortable with
any or all dao, odbc, ado, ado.net)? For the basics of working with vbscript
(in an ASP environment) you might try over here.

http://asp-help.com/database/db_tutorial1.asp

Understand that Visio has a very rich VBA environment under the covers and
ado/odbc works fine.

Al
 
R

Roberto Franco

Al,

Supose that I create the ODBC like you wrote in earlier e-mail and I also
run Organization Chart Wiz file (orgwiz.exe <arguments>) from the command
line.

How should the following parameters be filled?:
/DATASOURCE=<datasourcename>,TABLE=<tablename>,DBQUALIFIER=<databasequalifie
r>

Thank you,

Roberto
 
R

Roberto Franco

Ok Thank you very much Al.

Al Edlund said:
this is MS step by step for connecting to a database with a script using
ODBC and ADO. The parameters you're asking for are part of the discussion.

http://www.microsoft.com/resources/documentation/windows/2000/server/scriptguide/en-us/default.mspx

Al

Roberto Franco said:
Al,

Supose that I create the ODBC like you wrote in earlier e-mail and I also
run Organization Chart Wiz file (orgwiz.exe <arguments>) from the command
line.

How should the following parameters be filled?:
/DATASOURCE= said:
r>

Thank you,

Roberto





Al Edlund said:
That doesn't sound at all like a visio problem.
What are you using for the 'container'? The good news is that vbscript is
very close to vb(a). How experienced are you at database (comfortable
with
any or all dao, odbc, ado, ado.net)? For the basics of working with vbscript
(in an ASP environment) you might try over here.

http://asp-help.com/database/db_tutorial1.asp

Understand that Visio has a very rich VBA environment under the covers
and
ado/odbc works fine.

Al

Thank you Al

My problem is that I wont to automate the process of getting the data for
the Organization Chart from Sql Sever. I'd like to do it with VBscript
(
Not
using Visio 2003 program).

Any Idea on how to fill parameters for : DATASOURCE, TABLE and
DBQUALIFIER.?




ok as a test
use enterprise manager to create a database called TEMPDB
use DTS to import the sample excel spreadsheet ORGDATA.XLS
rename the SHEET1$ table to orgdata (for simplicity)
--------
control panel
ADMIN
ODBC
SYSTEM DSN - ADD
SQL SERVER - OK
name of connection ORGDATA (for simplicity)
description ' whatever
authentication - NT
change default db to TEMPDB
test connection
-------
visio 2003 org chart wizard
odbc compliant
select orgdata connection
select dbo.orgdata table
rest of it is use defaults

works fine for me...
Al
Thank very much Chris

I have created the ODBC for Sql data with NT Authentication and the
parameters for Wiz as follow:

strCommand = "/DATASOURCE=" & sDataSourceName & " ,TABLE=" &
"dbo.organization" & " ,DBQUALIFIER=" _
& " /SHOW-DIVIDER-LINE " _
& " /NAME-FIELD=Name " _
& " /UNIQUEID-FIELD=Name " _
& " /MANAGER-FIELD=Reports_To " _
& " /DISPLAY-FIELDS=Name" _
& " /CUSTOM-PROPERTY-FIELDS=Name" _
& " /SYNC-ACROSS-PAGES " _
& " /HYPERLINK-ACROSS-PAGES " _
& " /PAGES=" & chr(34) & "Rob Castillo" & chr(34)

But I still received error message "Invalid Data.Your Data File is
empty."
I
also have tested it against excel file with the same date without
problem.
I really don't know what to put in DBQUALIFIER parameter.

May be that's the problem

Aclaration: I also have tested it insideVisio Program with the same
ODBC
for
Sql with success (No error message).



"Chris Roth [ Visio MVP ]" <[email protected]>
wrote
in
message The Wiz allows you to hook to an ODBC data source. Can you create
an
ODBC
source for your Sql data?

Once you're past that, I'm pretty sure the Wiz lets you map Shape data
to
DB
Fields...

--

Hope this helps,

Chris Roth
Visio MVP


Hi Group

AnyBody know how to use addon "OrgcWiz" against Sql Server?. I only
need
to
know how to fill parameters of the followings commands:

DATASOURCE, TABLE and DBQUALIFIER.

Thank you very much
Robert
 

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