And, it's not possible to pass arguments to the Database Wizard in general,
however (although this is probably more complex than you were looking for)
you can access the shapesheet programmatically through VBA to put data into
the User-defined cells used by the Database Wizard for the ODBC data
connectivity and then call Refresh/Update add-ons (that are part of the
Database Wizard) without parameters. Here is information on the
user-defined cells from the Visio 2003 online help:
When Visio links a shape to a database, it also creates a User-Defined Cells
section in the ShapeSheet spreadsheet, if that section doesn't already exist
for the shape. In this section, Visio stores information about:
· The primary key for the database table.
· Which database fields are associated with which ShapeSheet cells.
· The last valid data retrieved from the database.
So you could run through the Database Wizard once to setup the links between
shapes and database, and then look at the User Cells and see what’s needed
to programmatically update the “last valid data” cells and then call the
refresh/update add-ons. I hope this helps.
--
Dick Hamilton
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.