Timeout command (in seconds). The default value is 30 seconds.
Namespace: Nemiro.Data.SqlAssembly: Nemiro.Data (in Nemiro.Data.dll) Version: 2.11.4.126 (2.11.4.126)
public int CommandTimeout { get; set; }
public int CommandTimeout { get; set; }
Public Property CommandTimeout As Integer
Get
Set
Public Property CommandTimeout As Integer
Get
Set
Property Value
Type:
Int32using (SqlClient client = new SqlClient())
{
client.CommandText = "WAITFOR DELAY '00:00:05'";
client.CommandTimeout = 1;
client.ExecuteNonQuery();
}
using (SqlClient client = new SqlClient())
{
client.CommandText = "WAITFOR DELAY '00:00:05'";
client.CommandTimeout = 1;
client.ExecuteNonQuery();
}
Using client As New SqlClient())
client.CommandText =
client.CommandTimeout = 1
client.ExecuteNonQuery()
End Using
Using client As New SqlClient())
client.CommandText = "WAITFOR DELAY '00:00:05'"
client.CommandTimeout = 1
client.ExecuteNonQuery()
End Using