I am creating a console application using Enterprise Library my code is something like this
DataSet ds = db.ExecuteDataSet(command);
this actually calling a SP which take 10-15 minutes to complete , so my come throws a time-out error.
Any idea how to overcome this.
Before calling the ExecuteDataSet method, set
command.CommandTimeoutto however many seconds you’re willing to wait before actually timing out. For example, if you’re willing to wait 2 hours for the query to complete, setcommand.CommandTimeoutto 7200.You can set the
CommandTimeoutproperty to zero for an infinite timeout, but this is generally a bad idea since if something goes really wrong, you don’t want to hang forever.