Redigera

Dela via


Query Method (RDS)

Uses a valid SQL query string to return a Recordset.

Important

Beginning with Windows 8 and Windows Server 2012, RDS server components are no longer included in the Windows operating system (see Windows 8 and Windows Server 2012 Compatibility Cookbook for more detail). RDS client components 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.

Syntax

  
Set Recordset = DataFactory.Query(Connection, Query)  

Parameters

Recordset
An object variable that represents a Recordset object.

DataFactory
An object variable that represents an RDSServer.DataFactory object.

Connection
A String value that contains the server connection information. This is similar to the Connect property.

Query
A String that contains the SQL query.

Remarks

The query should use the SQL dialect of the database server. A result status is returned if there is an error with the query that was executed. The Query method does not perform any syntax checking on the Query string.

Applies To

DataFactory Object (RDSServer)

See Also

DataFactory Object, Query Method, and CreateObject Method Example (VBScript)