Database Reference
In-Depth Information
First, get to the instance of the diagram services of the active document, which is the
page. Set the Visio Services version and the visibility of the external data sources window
to true:
diagramServices = ActiveDocument.DiagramServicesEnabled
ActiveDocument.DiagramServicesEnabled = visServiceVersion140
Application.ActiveWindow.Windows.ItemFromID(visWinIDExternalData).Visible =
True
The following steps are optional here. They are to populate the external data source
with values to facilitate if designer wants to bind the row data to the shapes in design
mode. Connect to the SQL store, retrieve the record set, and add the record set to the
active document data record set collection:
commandText = "SELECT ServerName, ServerIP, ServerStatus FROM
tblServerStatus"
connectionString = "Provider=SQLOLEDB;Data Source=<YourDataSourceName>;Initi
al Catalog=VisioServices;Integrated Security=SSPI; "
Set vsoDataRecordset = ActiveDocument.DataRecordsets.Add(connectionString,
commandText, 0, "Server Status Details")
Set the custom data provider assembly details to the recordset command string. Set
and enable the diagram services to the active document:
vsoDataRecordset.DataConnection.connectionString = "DataModule=Altsis.VisioD
ataService,VisioDataService;"
ActiveDocument.DiagramServicesEnabled = diagramServices
So far, you've seen a lot of information on Visio and Visio Services. Now it's time to
get to know some more references and information. You have seen the administration of
Visio services using the UI in Central Administration. Now, you will learn more options
for administering Visio Services using both CA and Windows PowerShell.
Summary
In this chapter, you learned about integrating Visio diagrams with SharePoint, configuration,
and connecting to various data sources such as SQL Server or a SharePoint list.
What's Next?
In the next chapter, you will learn about administration of Visio services in SharePoint
2013 using UI and PowerShell.
 
Search WWH ::




Custom Search