|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Change default timeoutHi everyone,
Here's my problem. I have a big vb.net application with a lot of calls to stored procs. I don't want to add the line "Command.commandTimeout = 600" in front of each of these calls. So, the default timeout is set to 30 seconds. I'm pratically sure that I canc change this 30 seconds in a registry or in a file somewhere. I hope that Microsoft didn't hard coded it in the class! My question: How can I change the default command timeout in one shot for all my application. Thanks a lot! Bawa The right way to go about doing this is to have a GetSqlCommand method (or
whatever command type you are using). This method would instantiate the object, set the CommandTimeout property, and return it. This would be the proper way to structure your application. Then, if you ever need to set some other property on all your command objects, you would do it in this method. I don't know of any setting for something like this on a machine, and I don't think it's necessary. Different applications would require different timeouts, and a global setting like this wouldn't work well. Show quoteHide quote "Bawa" <jfn***@gmail.com> wrote in message news:1155147897.722120.217570@m73g2000cwd.googlegroups.com... > Hi everyone, > > Here's my problem. I have a big vb.net application with a lot of calls > > to stored procs. I don't want to add the line "Command.commandTimeout > = 600" in front of each of these calls. So, the default timeout is set > > to 30 seconds. I'm pratically sure that I canc change this 30 seconds > in a registry or in a file somewhere. I hope that Microsoft didn't > hard coded it in the class! My question: How can I change the default > > command timeout in one shot for all my application. > > > Thanks a lot! > > > Bawa >
MessageBox in Validating event cancels subsequent events
Referencing Controls created at run time. Class item not accessible because it's private... but it's not? Dataset Drawstring question... ErrorProvider in .Net 2003 Passing parameters best practice Description of Function End all running code of .dll How do I send null values to an integer type variable? |
|||||||||||||||||||||||