Required client settings

Applies to: Access 2013 | Access 2016

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 = "https://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=https://yourServer" 

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.