<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Ben.geek.nz - Latest Comments in Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://ben.disqus.com/</link><description></description><language>en</language><lastBuildDate>Wed, 22 Oct 2008 10:53:29 -0000</lastBuildDate><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-3227379</link><description>You are a life saver! Thanks!!!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anon</dc:creator><pubDate>Wed, 22 Oct 2008 10:53:29 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182342</link><description>Thanks a lot, you saved me and my work :)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Goudarz</dc:creator><pubDate>Fri, 26 Oct 2007 01:37:08 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182340</link><description>Great stuff, needed one line, spent months rewriting queries to cut down on time and all I needed was the timeout set. Such is programming. Thanks.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Karl</dc:creator><pubDate>Thu, 24 May 2007 11:51:20 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182339</link><description>Thanks man, you rock.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 30 Apr 2007 19:48:16 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182341</link><description>hEY!..tHANKS A LOT. I BANGED MY HEAD FOR DAYS FOR THIS TO MAKE WORK. thx a lot dude</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Fri, 12 Jan 2007 14:35:53 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182338</link><description>Excellent...hit the nail right on teh head.&lt;br&gt;Thanks!!!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">BIGSJK</dc:creator><pubDate>Tue, 05 Dec 2006 16:42:29 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182336</link><description>TAHNK YOU !!!!!!!!!!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">sandro</dc:creator><pubDate>Sun, 15 Oct 2006 03:38:12 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182337</link><description>It Really worked for me thanx a lot</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sneha</dc:creator><pubDate>Thu, 14 Sep 2006 09:11:51 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182335</link><description>I went back and looked at your suggestion more closely.  I had set my command timeout but I had not set dataadapter.selectstatement.commandtimeout.  &lt;br&gt;That was the key.  Thanks!!!! You are awesome!  Now if you could only teach Microsoft how to do documentation :-)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ro</dc:creator><pubDate>Wed, 05 Oct 2005 15:56:53 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182334</link><description>I've set the command timeout, the connection timeout, th server.script timeout, and the iis configuration timeout and &lt;br&gt;my application is timing out before the set timeouts.  It is timing out on the dataadapter.fill statement.  It used to run fine until&lt;br&gt;the vendor realized they were missing tons of data in the database and fixed that problem.  The query averages 2 minutes &lt;br&gt;in query analyzer.  Any ideas?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ro</dc:creator><pubDate>Wed, 05 Oct 2005 15:44:33 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182333</link><description>just gotta give you credit for this item, I was on the verge of giving up having read a multitude of mind boggling listings when I found this.&lt;br&gt;Clean, Simple solution, obviously an issue people are coming across, I just hope they find this as well.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pot Belly</dc:creator><pubDate>Tue, 13 Sep 2005 18:53:04 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182332</link><description>Hi,&lt;br&gt;&lt;br&gt;I have the same problem, but none of the suggestions here helped.&lt;br&gt;&lt;br&gt;I've set the CommandTimeout property of my command to various values (60,90,120,300), and every time with my monster query, the page waits exactly the number of seconds of CommandTimeout and then gives me the error!&lt;br&gt;&lt;br&gt;Interestingly, in SQL Query Analyzer, the query takes 30 seconds!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Erik</dc:creator><pubDate>Fri, 26 Aug 2005 12:54:57 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182331</link><description>Hi,&lt;br&gt;&lt;br&gt;I tried your idea, and what the page does now is wait for a whopping 5 minutes and then give the same error, instead of giving it earlier. But when the stored procedure is run on its own, it takes less than two min. to do so.&lt;br&gt;&lt;br&gt;Any clue why it takes much longer in the application?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hari</dc:creator><pubDate>Tue, 09 Aug 2005 08:25:52 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182330</link><description>Hey Sameers,&lt;br&gt;Did you try setting the Adapters property to ContinueOnError??&lt;br&gt;its like&lt;br&gt;adapter.ContinueUpdateOnError &lt;br&gt;&lt;br&gt;may be you are getting error at some place in one of the records and&lt;br&gt;thats where you are stuck !! ??&lt;br&gt;&lt;br&gt;let me know</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">samir shah</dc:creator><pubDate>Wed, 25 May 2005 11:16:58 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182329</link><description>Well, the validation code is nothing more than validating the EMail address only. But I just got that working by changing SQLDataReader to DataTable. It worked fine but only one problem that it consumes 100% CPU + alot of memory. Which is bad for server.&lt;br&gt;&lt;br&gt;   I just remembered, that was not in my mind ago, that the SQLDataReader mentioned above belongs to the same table which is being updated by the stored procedure where I receive timeout error. Means, the datareader fetches rows from Promotions table and the stored procedure where timeout occrures also updates the same tabele. Actually I was fetching rows from Promotions table and then validation if that contains good email address then adds that to another table and mark that Promotion table's row to exported (column bExported=1).&lt;br&gt;&lt;br&gt;   IS that the real problem? Seems to be so, since when I changed to DataTable it worked fine even more than these rows (28K).&lt;br&gt;&lt;br&gt;   Thanks for your help,&lt;br&gt;   Sameers</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sameers (theAngrycodeR)</dc:creator><pubDate>Fri, 06 May 2005 06:13:14 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182328</link><description>That looks like something you should think about doing within one stored procedure.  Is the validation code you refere to ( "'Some code to validate data") code that has to be on the client side?  If not, that sort of data manipulation should really be pushed back to the SQL server.  It would be hugely faster to do the work on the SQL server, rather than pull the 28k rows onto the client, then do 28k insertions and updates.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ben</dc:creator><pubDate>Thu, 05 May 2005 22:57:06 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182327</link><description>Well, I have this execution within a loop of recordset (datareader) fetched from another table.&lt;br&gt;&lt;br&gt;Dim mReader as SQLDataReader = mCmd.ExecuteReader ()   'This statement returns 28K+ records&lt;br&gt;&lt;br&gt;While mReader.Read&lt;br&gt;   'Some code to validate data&lt;br&gt;   'Then insertion to a new table using stored procedure.&lt;br&gt;   'Updating of a column in the current data row. The code I written above&lt;br&gt;End While&lt;br&gt;&lt;br&gt;   I just tested this again by fetching fewer data (only 50 rows instead of that 28K+) and it worked fine. So the problem was due to heavy datareader (am I correct)? &lt;br&gt;&lt;br&gt;   Now any suggestion how to avoid this error while having such heavy datareader?&lt;br&gt;&lt;br&gt;   Thanks,</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sameers (theAngrycodeR)</dc:creator><pubDate>Thu, 05 May 2005 15:32:10 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182326</link><description>Well, I alrady have tried that but no Luck. BTW, the query (in stored procedure) is not that long enough. Just a simple update statement which update only one row in the database. Before this, I was using direct query to update that and at that moment I was also receiving this error. Thought update to stored procs to faster the work but error remained.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sameers (theAngrycodeR)</dc:creator><pubDate>Thu, 05 May 2005 15:23:05 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182325</link><description>You should be able to just set the CommandTimeout on your cmd2 object I think.  Something like&lt;br&gt;&lt;br&gt;cmd2.CommandTimeout = 300 (which would be 5 minutes)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ben</dc:creator><pubDate>Thu, 05 May 2005 15:15:36 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182324</link><description>Oooops, forgot to wrote that It do not stop at the very first record, works fine for sometime and then throws timeout error.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sameers (theAngrycodeR)</dc:creator><pubDate>Thu, 05 May 2005 08:47:07 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182323</link><description>Ok, I am also receiving this error. But I am not using Select like statement instead using Stored procedures to UPDATE database. Its a small routine which picks up data from one table (of one database) and insert that to second table (of second database).  Here is the little snippet of the code.&lt;br&gt;&lt;br&gt;Dim con2 As New SqlConnection(ConnectionStringHere)&lt;br&gt;con2.Open()&lt;br&gt;Dim cmd2 As New SqlCommand("StoredProcName, con2)&lt;br&gt;cmd2.Parameters.Add("@oneparam", paramvalue)&lt;br&gt;cmd2.CommandType = CommandType.StoredProcedure&lt;br&gt;cmd2.ExecuteNonQuery()&lt;br&gt;''' and BANG. &lt;br&gt;cmd2.dispose()&lt;br&gt;con2.close&lt;br&gt;&lt;br&gt;    &lt;br&gt;   The source table contains 40K+ records where I enumirate and for each record, after testing, I add that to second table using stored proc above.&lt;br&gt;&lt;br&gt;   Any idea?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sameers (theAngrycodeR)</dc:creator><pubDate>Thu, 05 May 2005 08:45:23 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182319</link><description>Thanks for this page saved me lots of time. I was at it for 5 hours.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Amir</dc:creator><pubDate>Thu, 28 Apr 2005 10:18:19 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182321</link><description>Glad I could help :)&lt;br&gt;Good point about renaming the page - will do.  I remember vividly how annoyed and then happy I was when I first discovered this issue!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ben</dc:creator><pubDate>Tue, 05 Apr 2005 17:35:14 -0000</pubDate></item><item><title>Re: Ben.geek.nz &amp;raquo; ADO.NET SQLAdapter Timeout Error</title><link>http://www.ben.geek.nz/timeout-what-timeout/#comment-1182320</link><description>This is the BEST PAGE ever, you described my situation to a tee, I have been banging my head for 3 hours!!!!  My only suggestion is to rename your page, I overlooked your site a few times, maybe SqlAdapter timeout errors..................anyways you rock, thank you so so so much..........stupid msdn..............I didn't mean that..... ;)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jason Gurgal</dc:creator><pubDate>Tue, 05 Apr 2005 16:44:40 -0000</pubDate></item></channel></rss>