XML Schema CommandTimeout

U

UnglueD

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
 
U

UnglueD

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;
}
}
}
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top