Required Client Settings

Microsoft ActiveX Data Objects (ADO)

RDS 2.5

Required Client Settings

Specify the following settings to use a custom DataFactory handler.

  • Specify "Provider=MS Remote" in the Connection object Provider property or the Connection object connection string "Provider=" keyword.
  • Set the CursorLocation property to adUseClient.
  • Specify the name of the handler to use in the RDS.DataControl object's Handler property, or the Recordset object's connection string "Handler=" keyword. (You cannot set the handler in the Connection object connect string.)
RDS provides a default handler on the server named MSDFMAP.Handler. (The default customization file is named MSDFMAP.INI.)

Example

Assume that the following sections in MSDFMAP.INI and the data source name, AdvWorks, have been previously defined:

[connect CustomerDataBase]
Access=ReadWrite
Connect="DSN=AdvWorks"

[sql CustomerById]
SQL="SELECT * FROM Customers WHERE CustomerID = ?"

The following code snippets are written in Visual Basic:

RDS.DataControl Version

Dim dc as New RDS.DataControl
Set dc.Handler = "MSDFMAP.Handler"
Set dc.Server = "http://yourServer"
Set dc.Connect = "Data Source=CustomerDatabase"
Set dc.SQL = "CustomerById(4)"
dc.Refresh

Recordset Version

Dim rs as New ADODB.Recordset
rs.CursorLocation = adUseClient

Specify either the Handler property or keyword; the Provider property or keyword; and the CustomerById and CustomerDatabase identifiers. Then open the Recordset object.

rs.Open "CustomerById(4)", "Handler=MSDFMAP.Handler;" & _
   "Provider=MS Remote;Data Source=CustomerDatabase;" & _
   "Remote Server=http://yourServer"

See Also

Customization File Connect Section | Customization File Logs Section | Customization File SQL Section | Customization File UserList Section | DataFactory Customization | Microsoft OLE DB Remoting Provider | Understanding the Customization File | Writing Your Own Customized Handler

© 1998-2003 Microsoft Corporation. All rights reserved.