Microsoft Office Tutorials and References
In Depth Information
Make sure the following are correct to avoid the error shown in Figure 2-85 :
Figure 2-85. External data connection refresh error
assembly details are accurate when you add the custom data providers in the Central
the WCF services are properly hosted and can communicate with the Custom Data providers.
Your configuration files (Web.config) have the right binding settings for the WCF.
as discussed earlier, you might encounter the double-hop issue while connecting to data
sources via WCF. if so, you might need to set the credentials under the secure store service.
At first glance, the process of creating a Custom Data Provider might sound a bit complicated. However,
in reality it’s just a matter of practice and getting used to the process. Summarized next are the important steps
you just followed to create and consume the custom data provider:
We started off by creating a simple stored procedure ( uspGetServerDetails ) to fetch the
server status from the tblServerStatus table.
Next, we created a WCF service, which invoked the aforementioned stored procedure
to retrieve the server status data from the database.
Then we created the custom data provider, to consume the WCF service.
Finally, we designed the Visio Diagram and wrote a VBA script to create the data source
and connect it to the shapes in the diagram.
The following section walks you through the code for the stored procedure (step 1 above), WCF service (step 2),
Custom Data Provider class (step 3), and VBA Code (step 4).
UNDerStaNDING the CUStOM Data prOVIDer CODe
uspGetServerDetails Stored procedure (Listing 2-2)
this stored procedure contains a simple t-sQL statement that retrieves all rows of data from the table
SELECT ServerName, ServerIP, ServerStatus from tblServerStatus
Search JabSto ::