ConnectionContext.CommandTimeout Property
Gets the time (in seconds) that elapses before the command that executes the batch statement times out.
Namespace: Microsoft.VisualStudio.TeamSystem.Data.UnitTesting
Assembly: Microsoft.VisualStudio.TeamSystem.Data.UnitTesting (in microsoft.visualstudio.teamsystem.data.unittesting.dll)
Syntax
'Declaration
Public Property CommandTimeout As Integer
'Usage
Dim instance As ConnectionContext
Dim value As Integer
value = instance.CommandTimeout
instance.CommandTimeout = value
public int CommandTimeout { get; set; }
public:
property int CommandTimeout {
int get ();
void set (int value);
}
/** @property */
public int get_CommandTimeout ()
/** @property */
public void set_CommandTimeout (int value)
public function get CommandTimeout () : int
public function set CommandTimeout (value : int)
Exceptions
Exception type | Condition |
---|---|
The value used to set CommandTimeout is less than zero (0). |
Remarks
Use this property to configure the DbCommand that is used to execute the Transact-SQL (T-SQL) statement or statements. The default value is 30 seconds.
If you want to debug into the stored procedure that is being invoked, increase the.CommandTimeout to prevent the debugging session from causing your test to fail. When Team Edition for Database Professionals creates an instance of this class, it populates this property from the settings for the app.config file in the test project.
See Also
Reference
ConnectionContext Class
ConnectionContext Members
Microsoft.VisualStudio.TeamSystem.Data.UnitTesting Namespace