AdoSubmitConnection.Timeout property

Gets or sets the timeout value in seconds for a data connection associated with an AdoSubmitConnection object.

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

Syntax

'Declaration
Public MustOverride Property Timeout As Integer
    Get
    Set
'Usage
Dim instance As AdoSubmitConnection
Dim value As Integer

value = instance.Timeout

instance.Timeout = value
public abstract int Timeout { get; set; }

Property value

Type: System.Int32
The timeout value in seconds.

Remarks

The Timeout property of the ADOSubmitConnection object contains the timeout value that is used by the ADO data adapter to regulate the time used to submit data to an ActiveX Data Objects/OLEDB external data source.

The Timeout property specifies the timeout value in seconds. By default, the Microsoft InfoPath application sets the timeout value to 30 seconds. The value specified for the Timeout property will override this application setting.

Important

An ADOSubmitConnection object can only exist when there is a corresponding ADOQueryConnection object, and the data connections represented by both objects share the same set of property values. Changing the value of this property for the ADOSubmitConnection object will also change the value of the same property for the corresponding ADOQueryConnection object.

Note

The ADOSubmitConnection object is limited to work only with Microsoft SQL Server and Microsoft Access databases.

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.

Examples

In the following example, the event handler for a Button control uses the Timeout property of the AdoSubmitConnection class, which is used to display the timeout value.

public void DisplayTimeout_Clicked(object sender, ClickedEventArgs e)
{
   // Get the Employees connection from the 
   // DataConnections collection.
   AdoSubmitConnection myAdoSubmitConnection = 
      (AdoSubmitConnection)(this.DataConnections["Employees"]);
   
   // Display Timeout value.
   MessageBox.Show (myAdoSubmitConnection.Timeout.ToString());
}
Public Sub DisplayTimeout_Clicked(ByVal sender As Object, _
   ByVal e As ClickedEventArgs)
   ' Get the Employees connection from 
   ' the DataConnections collection.
   Dim myAdoSubmitConnection As AdoSubmitConnection = _
      DirectCast(Me.DataConnections("Employees"), AdoSubmitConnection)

   ' Display Timeout value.
   MessageBox.Show (myAdoSubmitConnection.Timeout.ToString())
End Sub

See also

Reference

AdoSubmitConnection class

AdoSubmitConnection members

Microsoft.Office.InfoPath namespace