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);
| Constructor Summary |
|---|
DataConnection()
Constructor. |
| Property Getters/Setters Summary | ||
|---|---|---|
method | getAlwaysUseConnectionFile() | |
method | setAlwaysUseConnectionFile(value) | |
| The default value is false. See Remarks for more information. The value of the property is BOOL integer constant. | ||
method | getCommand() | |
method | setCommand(value) | |
| The command string used to query the data source. | ||
method | getConnectionString() | |
method | setConnectionString(value) | |
| The connection string that defines the parameters necessary to connect to a data source. | ||
method | getFileName() | |
method | setFileName(value) | |
| The name of the connection file. See Remarks for more information. | ||
method | getID() | |
method | setID(value) | |
| The ID assigned by Visio for a given connection, unique within the document. | ||
method | getTimeout() | |
method | setTimeout(value) | |
| wait time in minutes while trying to establish a connection before terminating the attempt. | ||
long getID() / setID(value)
String getFileName() / setFileName(value)
String getConnectionString() / setConnectionString(value)
String getCommand() / setCommand(value)
long getTimeout() / setTimeout(value)
int getAlwaysUseConnectionFile() / setAlwaysUseConnectionFile(value)