XML Schema CommandTimeout

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • UnglueD

    #1

    XML Schema CommandTimeout

    Hello,

    I have an application that grabs data through use of a strongly typed
    XSD. However, in doing so, I am wondering if I have lost the ability
    to set the CommandTimeout on the command object (since I do not have
    the command object explicitly anymore).


    I have a stored procedure that grabs a bunch of orders for bulk
    processing. If there are a lot of orders the stored procedure times
    out.

    While I will look into optimizing the query down the road, I was
    wondering if I can still set the CommandTimeout property somehow.


    Thanks

  • UnglueD

    #2
    Re: XML Schema CommandTimeout

    I did find a way to solve this, using a partial class. Would there be
    any other solutions?

    namespace programTableAda pters
    {
    public partial class OrderTableAdapt er
    {
    public void SetCommandTimeo ut(int timeout)
    {
    foreach (IDbCommand command in CommandCollecti on)
    command.Command Timeout = timeout;
    }
    }
    }

    Comment

    Working...