new DataConnection()

Constructor.

Example

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram("EditDataConAndRefreshRecords.vsd");
// set connecting string
diagram.getDataConnections().get(0).setConnectionString("Data Source=MyServer;Initial Catalog=MyDB;Integrated Security=True");
// set command
diagram.getDataConnections().get(0).setCommand("SELECT * from Project with(nolock)");
diagram.save("out-EditDataConAndRefreshRecords.vdx", aspose.diagram.SaveFileFormat.VDX);

Methods

getAlwaysUseConnectionFile()

The default value is false. See Remarks for more information. The value of the property is BOOL integer constant.

getCommand()

The command string used to query the data source.

getConnectionString()

The connection string that defines the parameters necessary to connect to a data source.

getFileName()

The name of the connection file. See Remarks for more information.

getID()

The ID assigned by Visio for a given connection, unique within the document.

getTimeout()

wait time in minutes while trying to establish a connection before terminating the attempt.

setAlwaysUseConnectionFile()

The default value is false. See Remarks for more information. The value of the property is BOOL integer constant.

setCommand()

The command string used to query the data source.

setConnectionString()

The connection string that defines the parameters necessary to connect to a data source.

setFileName()

The name of the connection file. See Remarks for more information.

setID()

The ID assigned by Visio for a given connection, unique within the document.

setTimeout()

wait time in minutes while trying to establish a connection before terminating the attempt.