SQL Property

The SQL property stores the SQL code of the stored procedure.

Applies to objects: QueryDef.

Syntax

[[Let] RetVal = ] object.SQL

[Let] object.SQL = SetVal

The SQL property syntax has these parts:

Part Description
object Required. A reference to an instance of the object.
RetVal Optional. A String type variable.
SetVal Required. A String type variable.

Remarks

You can execute the given SQL query by using the OpenRecordset method, with the QueryDef object name as the parameter.

Example

.......

 

See Also

QueryDef Object, OpenRecordset Method.