asposediagram.api

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
methodgetAlwaysUseConnectionFile()
method
           The default value is false. See Remarks for more information. The value of the property is BOOL integer constant.
methodgetCommand()
method
setCommand(value)
           The command string used to query the data source.
methodgetConnectionString()
method
           The connection string that defines the parameters necessary to connect to a data source.
methodgetFileName()
method
           The name of the connection file. See Remarks for more information.
methodgetID()
method
setID(value)
           The ID assigned by Visio for a given connection, unique within the document.
methodgetTimeout()
method
setTimeout(value)
           wait time in minutes while trying to establish a connection before terminating the attempt.
 

    • Constructor Detail

      • DataConnection

        DataConnection()
        Constructor.
    • Property Getters/Setters Detail

      • getID/setID : long 

        long getID() / setID(value)
        
        The ID assigned by Visio for a given connection, unique within the document.
      • getFileName/setFileName : String 

        String getFileName() / setFileName(value)
        
        The name of the connection file. See Remarks for more information.
      • getConnectionString/setConnectionString : String 

        String getConnectionString() / setConnectionString(value)
        
        The connection string that defines the parameters necessary to connect to a data source.
      • getCommand/setCommand : String 

        String getCommand() / setCommand(value)
        
        The command string used to query the data source.
      • getTimeout/setTimeout : long 

        long getTimeout() / setTimeout(value)
        
        wait time in minutes while trying to establish a connection before terminating the attempt.
      • getAlwaysUseConnectionFile/setAlwaysUseConnectionFile : int 

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