aspose.diagram
Class DataConnection

Abstracts communication between one or more DataRecordset elements and a non-XML data source.

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
functiongetAlwaysUseConnectionFile()
functionsetAlwaysUseConnectionFile(value)
           The default value is false. See Remarks for more information. The value of the property is BOOL integer constant.
functiongetCommand()
functionsetCommand(value)
           The command string used to query the data source.
functiongetConnectionString()
functionsetConnectionString(value)
           The connection string that defines the parameters necessary to connect to a data source.
functiongetFileName()
functionsetFileName(value)
           The name of the connection file. See Remarks for more information.
functiongetID()
functionsetID(value)
           The ID assigned by Visio for a given connection, unique within the document.
functiongetTimeout()
functionsetTimeout(value)
           wait time in minutes while trying to establish a connection before terminating the attempt.
 

Constructor Detail

DataConnection

function DataConnection()
Constructor.

Property Getters/Setters Detail

getID/setID : long 

function getID() / function setID(value)
The ID assigned by Visio for a given connection, unique within the document.

getFileName/setFileName : String 

function getFileName() / function setFileName(value)
The name of the connection file. See Remarks for more information.

getConnectionString/setConnectionString : String 

function getConnectionString() / function setConnectionString(value)
The connection string that defines the parameters necessary to connect to a data source.

getCommand/setCommand : String 

function getCommand() / function setCommand(value)
The command string used to query the data source.

getTimeout/setTimeout : long 

function getTimeout() / function setTimeout(value)
wait time in minutes while trying to establish a connection before terminating the attempt.

getAlwaysUseConnectionFile/setAlwaysUseConnectionFile : Number 

function getAlwaysUseConnectionFile() / function setAlwaysUseConnectionFile(value)
The default value is false. See Remarks for more information. The value of the property is BOOL integer constant.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.