Query timeout after 30 seconds using .net data provider and VS 2005 SP1
Currently i am having issue's when it comes to getting results of a query from a Teradata DW server if the query takes longer then 30 seconds to run. I know that this is the default, and i did look it up in the forums but i still can't seem to figure out how to change the commandtimeout parameter.
I am using .NET Data Provider for Teradata 13.00.00.00 driver with Visual Studios 2005 SP1 and the query with be run in a ASP.net webpage. I am creating the queries in a Dataset(xsd file) and then binding them to a dataviewer using a Ojectdatasource.
How would i go about changing the CommandTimeout default value?
Re: Query timeout after 30 seconds using .net data provider and VS 2005 SP1
The easiest way to do this in ASP.NET is to use a SqlDataSource. You have to set the CommandTimeout in a script. An example is below in c# with the non-pertinent sections removed.
Selecting event - The CommandTimeout is in seconds and setting it to 0 is equivilent to do not ever timeout. Selected event - This, in combination with setting the DataSourceMode to DataSet, lets me set a text box telling the number of records returned.