No, the folks that built the Data Source configuration wizard that generates TableAdapter classes did not see fit to include the ability to set the CommandTimeout property for the numerous SELECT and DML Command objects they build for you.
To address this issue you’ll need to implement a Partial Class to create your own properties.
Here’s a hint—the rest of the code is in an upcoming article…
Namespace NorthWind2008DataSetTableAdapters
Partial Public Class CustomersTableAdapter
Public Property SelectCommandTimeout() As Integer
Get
Return (Me.Adapter.SelectCommand.CommandTimeout)
End Get
Set(ByVal value As Integer)
' Note that Me.Adapter.SelectCommand might not exist
' Reference to CommandCollection(0)
' might trigger creation of CommandCollection
If Me.CommandCollection(0) Is Nothing Then
' CommandCollection not created
' Probably should throw an exception here...
Else
' SelectCommand is created from the CommandCollection
Me.CommandCollection(0).CommandTimeout = value
End If
End Set
End Property
End Class
End Namespace
