ADO » DataControl » SQL

Syntax:
string = datacontrolobject.SQL
datacontrolobject.SQL = string

Sets or returns the SQL query string.

The SQL property sets or returns a string that is an SQL query that is used by RDS to retrieve the Recordset. The string must use the type of dialect of SQL that is recognized by the server.

You can create a form on a Web page to input values for the various DataControl properties and use Request.Form( ) to assign the values.

Examples

Code:
objDC.ExecuteOptions = Request.Form("ExecuteOptions")
objDC.FetchOptions = Request.Form("FetchOptions")
objDC.InternetTimeout = Request.Form("InternetTimeout")
objDC.Server = Request.Form("Server.Value")
objDC.SourceRecordset = Request.Form("SourceRecordset")
objDC.SQL = Request.Form("SQL")
objDC.URL = Request.Form("URL")
objDC.Connect = Request.Form("Connect")
objDC.Refresh

See Also: