The connection string becomes
Data Source=EmployeeDB
and the parametric query string becomes
EmployeeDB('Davolio')
where Davolio is one of the last names in the Northwind database. If you're using more parameters, use comma-delimited arguments:
EmployeeDB('Davolio', 'Nancy')
If you want to use a nondefault handler, or if you want to specify the handler's ProgID anyway, the correct syntax is
rst = df.Query("Handler=MSDFMAP.Handler; Data Source=EmployeeDB", sql);
If you plan to use the RDS.DataControl component for data binding, the approach is only slightly different from the previous one:
dc = new ActiveXObject("RDS.DataControl");
dc.Server = "http://expoware";
dc.Connect = "Data Source=EmployeeDB";
dc.Handler = "MSDFMAP.Handler";
dc.Sql = "EmployeeDB('Davolio')";
dc.Refresh();
You can also use custom .ini files to configure the default MSDFMAP .Handler handler if you want to keep settings separate. To configure the handler in this manner, modify the handler string to
Handler = "MSDFMAP.Handler, another.ini"
All .ini files for MSDFMAP.Handler must reside in the Windows directory.
More RDS Information
The Microsoft Developer Network (MSDN) contains plenty of valuable information about RDS. The easiest way to select all the most relevant articles is to search the site, using RDS as the keyword.
Here are a few must-read articles I've found especially informative. To help you understand the key role of RDS 2.x and handlers, I recommend two Microsoft technical articles on the January 2000 MSDN CD-ROM: "Remote Data Service in MDAC 2.0" and "Using the Customization Handler Feature in RDS 2.1." If you already know the basics of RDS and are looking for tips and tricks, the following Microsoft articles cover RDS topics such as security, limitations, hierarchical recordsets, and custom business objects:
- "PRB: Firewalls or Proxy Servers Can Cause RDS to Fail" (http:// support.microsoft.com/support/kb/articles/q221/2/40.asp)
- "FIX: RDS 2.0 Client Cannot Submit Changes to RDS 1.5 Server" (http://support.microsoft.com/support/kb/articles/q198/5/31.asp)
- "PRB: Security Implications of RDS 1.5, IIS 3.0 or 4.0, and ODBC" (http://support.microsoft.com/support/kb/articles/q184/3/75.asp)
Note also that you can ask the Microsoft Support Web site to email you these documents. Just write to mshelp@microsoft.com and specify the article code (e.g., Q184375) on the subject line; you'll receive the article within a few hours.
End of Article
Prev. page
1
2
[3]
next page -->