Important-
This feature will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Applications that use RDS should migrate to WCF Data Service.
The Query method is deprecated in ADO.
Executes a valid SQL query and returns a Recordset object.
The Query method executes a valid SQL query string and returns the resultant Recordset object. The query string must use the type (dialect) of SQL that is recognized by the provider. This method does not perform a syntax check on the query string.
There are two mandatory parameters.
Set objDataFactory = objRDS.CreateObject("RDSServer.DataFactory", strConnURL)
...
Dim objRecordset
Set objRecordset = objDataFactory.Query(strConnection, strQuery)