XML Schema CommandTimeout

Discussion in 'ASP .Net' started by UnglueD, Aug 31, 2006.

  1. UnglueD

    UnglueD Guest

    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, Aug 31, 2006
    #1
    1. Advertising

  2. UnglueD

    UnglueD Guest

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

    namespace programTableAdapters
    {
    public partial class OrderTableAdapter
    {
    public void SetCommandTimeout(int timeout)
    {
    foreach (IDbCommand command in CommandCollection)
    command.CommandTimeout = timeout;
    }
    }
    }
     
    UnglueD, Aug 31, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page