DataConnection.ConnectionString Property

Visio Automation Reference

Gets or sets the connection string that you can use to access an existing DataConnection object or to create a new DataConnection object. Read/write.

ms367403.vs_note(en-us,office.12).gif  Note
This Visio object or member is available only to licensed users of Microsoft Office Visio Professional 2007.

Version Information
 Version Added:  Visio 2007

Syntax

expression.ConnectionString

expression   An expression that returns a DataConnection object.

Return Value
String

Remarks

The value of the ConnectionString property for a given DataRecordset object is the same string that you would pass to the DataRecordsets.Add method to create the data recordset.

The easiest way to determine an appropriate connection string for a particular data source is to use the Data Selector Wizard in the Visio user interface (UI) to make the same connection, recording a macro while running the wizard, and then copying the connection string from the macro code.

Setting the ConnectionString property to a new value has no effect on data already in any data recordsets. To update the data in a data recordset using a new ConnectionString setting, call the DataRecordset.Refresh method.

See Also