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