ADO » DataControl » Connect

Syntax:
string = datacontrolobject.Connect
datacontrolobject.Connect = string

Sets or returns a string value that is the ADO connection string name.

The Connect property sets or returns a valid connection string that allows the RDS server component to connect to the database. This will be the database against which the queries and updates will be run.

In contrast, the Server property is used to set the Web server URL and the associated protocol.

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: