ADO » DataFactory » Query

Set recordsetobject = datafactoryobject.Query(ConnectionString, QueryString)
The ConnectionString parameter is a string that contains the details of the server connection information.
The QueryString parameter is a string that contains the SQL query.


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)

See Also: