Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

time out expired when execute stored procedure

Posted on 2008-10-23
3
Medium Priority
?
835 Views
Last Modified: 2012-05-05
hi guys i have a stored procedure that basically has a select statement. i know my table is very big it could be well more than 1million rows. but the statement only runs for 2 mintues and already i get a time out. even though i set my timeout very high. here is the code for the function and the time out. please help me if you know what i did wrong. thank you very much
<httpRuntime executionTimeout="100000000" />  this is in the web.config
 
this below is in my default.aspx.vb .
query parameter is just a select like select * from table1.
    Public Function GetDataTable(ByVal query As String) As DataTable
 
        Dim adapter1 As New SqlDataAdapter
        adapter1.SelectCommand = New SqlCommand(query, allfunctions.SQLConnection)
        Dim table1 As New DataTable
        allfunctions.SQLConnection.Open()
        Try
            adapter1.Fill(table1)
        Finally
            allfunctions.SQLConnection.Close()
        End Try
        Return table1
    End Function

Open in new window

0
Comment
Question by:StewSupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 2000 total points
ID: 22792578
Try also setting the SelectCommand.Timeout value --

adapter1.SelectCommand.CommandTimeout = 100000000
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 22792579
Other place to check is the IIS script timeout.
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 22792763
what kind of time out you are talking about (there are 3 kinds)
1. Sessiontimeout controlled by IIS
2. IIS thread execution timeoout
3. DB Command timeout

1. Can be controlled through timeout in the following (in seconds)
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="2000" />

2. Can be controlled by setting the executionTimeout (in seconds) (I think u might need to set this)
<httpRuntime executionTimeout="XXX" />

3. Can be controlled by setting the Command Timeout to 0 (means infinite)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question