I'm getting timeouts when I try to run them in my asp.net page.
From my research it seems that I need to increase the Command Timeout setting. I'm storing my connection string in my web.config file and I can't seeem to get the syntax correct for increasing the command timeout setting.
Can someone show my how it's done.
My connection string (from web.config):
<appSettings>
<add key="DataGold" value="server=localhost;uid=datauser;pwd=qu3ry;database=DataGold" />
</appSettings>
TIA.If you are working with command object, then you can increase timeout for it by
myCommand.CommandTimeout = Time
Or if Dataadapter using command object then it wll go as
DataAdapter.SelectCommand.CommandTimeout = Time
Difference between command & connection Timeouts:
CommandTimeout Property Gets or sets the wait time before terminating the attempt to execute a command and generating an error. The default is 30 seconds.
ConnectionTimeout Property Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error. The default value is 15 seconds.
No comments:
Post a Comment