Using Remote Data Services

[Previous] [Next]

I briefly mentioned RDS in Chapter 4 as a mechanism for retrieving data by routing a command through a web server. I also alluded to it earlier in this chapter as a way to avoid the cross-domain data access warning. Although I will not describe the operational details of RDS here, I will discuss the features of the DSC that make using RDS easier. For more general information on RDS, see the RDS documentation in the OLE DB SDK (which is quite detailed) and the various white papers available at http://www.microsoft.com/data.

The DSC exposes a property at its top-level interface named UseRemoteProvider. By default, this property is set to False and the DSC uses whatever OLE DB provider you specify in the provider attribute of your connection string. However, if you set this property to True, the DSC alters the connection string you specify so that it uses the RDS provider. If you are already familiar with RDS, you know that the RDS provider needs two pieces of information to retrieve data:

  • The name of a web server on which the RDS server components reside.
  • The name of the real data provider that RDS will use on the web server.

When the DSC alters your connection string, it uses the name of the web server from which the page originates for the first setting and uses the value you indicate in the provider attribute as the name for the real data provider on the server. The DSC also alters your connection string to use the Data Shape Provider (mentioned earlier) whether or not you use RDS.

For example, suppose you use the following connection string:

 Provider=sqloledb;Data Source=MySQLServer; Initial Catalog=Northwind;User Id=sa;Password=; 

After you set the UseRemoteProvider property to True, the DSC changes your connection string to this:

 Provider=MSDataShape.1;Extended Properties="REMOTE PROVIDER=sqloledb; REMOTE SERVER=http://web server;EXTENDED PROPERTIES='INITIAL  CATALOG=Northwind;'";Persist Security Info=True;Connect Timeout=15; Data Source=MySQLServer;User ID=sa;Data Provider=MS Remote 

Because RDS is set to use the same web server from which the page originated, the data access is considered to be in the same domain. Therefore, you will not see any cross-domain data access warnings, regardless of the zone in which the page runs. RDS is useful for avoiding these warnings, but it does require extra setup and configuration on the web server. Since the RDS client provider is included with the Office Web Components setup, no extra setup steps are needed on the client machine.



Programming Microsoft Office 2000 Web Components
Programming Microsoft Office 2000 Web Components (Microsoft Progamming Series)
ISBN: 073560794X
EAN: 2147483647
Year: 1999
Pages: 111
Authors: Dave Stearns

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net