Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1176
  • Last Modified:

xsd Command Timeout

Afternoon,

I've googled this topic and found a few references to it.  As I understand it is pretty simple to set the SqlCommand.commandtimeout = x when dealing with dataadapter built in code but there is no way of doing this with xsd, auto-genereated table adapters.  From what I gather I need to build my own subclass of the command object, here's a few links giving examples of this.  They are in C though so can anyone give me a more detailed example in VB.

http://www.netnewsgroups.net/group/microsoft.public.dotnet.framework.aspnet/topic33902.aspx


http://www.velocityreviews.com/forums/t123018-p2-how-to-set-commandtimeout-for-objectdatasource-aspnet-20.html


Many thanks
0
nick210577
Asked:
nick210577
1 Solution
 
Bob LearnedCommented:
Code conversion:

http://www.netnewsgroups.net/group/microsoft.public.dotnet.framework.aspnet/topic33902.aspx

Namespace programTableAdapters
    Public Partial Class OrderTableAdapter
        Public Sub SetCommandTimeout(ByVal timeout As Integer)
            For Each command As IDbCommand In CommandCollection
                command.CommandTimeout = timeout
            Next
        End Sub
    End Class
End Namespace
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now