Connected (Property)

Applies To:

Connection object

Description:

Returns a value that represents the connection status of a connection object. This property returns true if the user is connected to the data source; otherwise, it returns false.

Action:

Read-only, Boolean

Example:

This example shows how to check the connection status of a connection object and prompt users to connect:

var MyCon =ActiveDocument.Sections["SalesQuery"].DataModel.Connection
if (MyCon.Connected ==false)
{
	if (Alert
	("Do you want to connect to the database?", "Get Connected"," Yes"," No")==1)
		MyCon.Connect()
 }