tony_bailey
asked on
Dreamweaver MX Calling SQL Server Stored Procedure - 'Timeout Expired' error
Hi
I am a new user - so all help would be most appreciated.
I am calling a SQL Server stored procedure from Dreamweaver MX, and am using VB and ASP.NET.
My queries have been running fine until a user started pulling back large sets of data when the following error message was displayed after 30 seconds of processing time:
System.Data.SqlClient.SqlE xception: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at System.Data.SqlClient.SqlC ommand.Exe cuteReader (CommandBe havior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlC ommand.Exe cuteReader (CommandBe havior behavior)
at System.Data.SqlClient.SqlC ommand.Sys tem.Data.I DbCommand. ExecuteRea der(Comman dBehavior behavior)
at System.Data.Common.DbDataA dapter.Fil lFromComma nd(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataA dapter.Fil l(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataA dapter.Fil l(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable)
at DreamweaverCtrls.DataSet.D oInit()
Whatever I do I can't seem to increase the Timeout value to greater than 30 seconds.
I have checked that the SQL Server Query Timeout limit is set to 0, so it shouldn't be the problem.
I have tried adding <%server.ScriptTimeout=360 %> to the top of the web page, to no effect.
I have investigated setting the SqlCommand.CommandTimeout value, but am unsure how it will fit in the MM:DataSet definition:
<MM:DataSet
runat="Server"
id="spResults"
IsStoredProcedure="true"
CreateDataSet="true"
ConnectionString='<%# System.Configuration.Confi gurationSe ttings.App Settings(" MM_CONNECT ION_STRING _connProgD B2002") %>'
DatabaseType='<%# System.Configuration.Confi gurationSe ttings.App Settings(" MM_CONNECT ION_DATABA SETYPE_con nProgDB200 2") %>'
CommandText="dbo.sp_Extrac t_By_Prog_ Post02"
Debug="true"
>
Or am I misunderstanding the problem?
Is it the Connection time which is timing out?
All suggestions most gratefully accepted.
Many thanks
Tony Bailey
I am a new user - so all help would be most appreciated.
I am calling a SQL Server stored procedure from Dreamweaver MX, and am using VB and ASP.NET.
My queries have been running fine until a user started pulling back large sets of data when the following error message was displayed after 30 seconds of processing time:
System.Data.SqlClient.SqlE
at System.Data.SqlClient.SqlC
at System.Data.SqlClient.SqlC
at System.Data.SqlClient.SqlC
at System.Data.Common.DbDataA
at System.Data.Common.DbDataA
at System.Data.Common.DbDataA
at DreamweaverCtrls.DataSet.D
Whatever I do I can't seem to increase the Timeout value to greater than 30 seconds.
I have checked that the SQL Server Query Timeout limit is set to 0, so it shouldn't be the problem.
I have tried adding <%server.ScriptTimeout=360
I have investigated setting the SqlCommand.CommandTimeout value, but am unsure how it will fit in the MM:DataSet definition:
<MM:DataSet
runat="Server"
id="spResults"
IsStoredProcedure="true"
CreateDataSet="true"
ConnectionString='<%# System.Configuration.Confi
DatabaseType='<%# System.Configuration.Confi
CommandText="dbo.sp_Extrac
Debug="true"
>
Or am I misunderstanding the problem?
Is it the Connection time which is timing out?
All suggestions most gratefully accepted.
Many thanks
Tony Bailey
ASKER
Apologies for not getting back to your reply sooner.
Your suggestion appears to be for ColdFusion Dreamweaver solutions while I am using ASP.NET.
Any ideas for asp.net, as my understanding is that it it quite different.
Many thanks
Your suggestion appears to be for ColdFusion Dreamweaver solutions while I am using ASP.NET.
Any ideas for asp.net, as my understanding is that it it quite different.
Many thanks
Even though you are using VB / ASP -- you can still hook in via the CF Connections to the databases.
If you have a ASP.NET connection, what are you using for your connection string a VB/ASP.NET OLEDB Connection or a VB/ASP.NET ODBC Connection ?
By the looks of it you are using CF Connections to your database.
Try adding : ConnectionTimeout = 0 or ConnectTimeout = 0
If you have a ASP.NET connection, what are you using for your connection string a VB/ASP.NET OLEDB Connection or a VB/ASP.NET ODBC Connection ?
By the looks of it you are using CF Connections to your database.
Try adding : ConnectionTimeout = 0 or ConnectTimeout = 0
ASKER
I am connecting using the Dreamweaver utilities, e.g.
<MM:DataSet
runat="Server"
id="spResults"
IsStoredProcedure="true"
CreateDataSet="true"
ConnectionString='<%# System.Configuration.Confi
DatabaseType='<%# System.Configuration.Confi
CommandText="dbo.sp_Extrac
I tried adding a connection timeout parameter to this code, but it was ignored as it doesn't seem to be supported.
The actual connection is made through a web.config file, containing for example the following:
<configuration>
<appSettings>
<add key="MM_CONNECTION_HANDLER
<add key="MM_CONNECTION_STRING_
<add key="MM_CONNECTION_DATABAS
<add key="MM_CONNECTION_SCHEMA_
<add key="MM_CONNECTION_CATALOG
</appSettings>
</configuration>
Many thanks for all your advice
Tony
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
(On CF Server -- the timeouts were handled by the CF app Server and changed in the Admin web-site and the default was 30 seconds...)