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