2. Create a New Safe Data Provider
Scenario/Problem: You need to create a new safe data provider for Visio Graphics Services.
Solution: Use the New-SPVisioSafeDataProvider
cmdlet.
The New-SPVisioSafeDataProvider
cmdlet can be used to create a new safe data provider that Excel
workbooks can access via a data connection. Provide the provider
information and the Visio Graphics Service instance, as shown in Listing 2.
Listing 2. Create a New Safe Data Provider
New-SPVisioSafeDataProvider -VisioServiceApplication "Visio Graphics
Service" -DataProviderID "Custom DB" -DataProviderType 6
-DataProviderID
is an identifier for the data provider. -DataProviderType
can be any of the following integer values:
1 - OLE DB
2 - SQL Server
3 - ODBC
4 - ODBC with DSN
5 - SharePoint List
6 - Custom
Tip
Verify third-party data provider documentation for the proper Data Provider ID and Data Provider Type to use.
Upon successful creation of the new safe data provider, a summary of the properties displays, as shown in Figure 1.
Figure 1. Creating a new safe data provider entry.
Notice that the DataProviderTypeDescription
is blank. The New-SPVisioSafeData Provider
cmdlet does not have a parameter to include a description. To update the description, you need to use the Set-SPVisioSafeDataProvider
cmdlet.