Community Page
- www.ben.geek.nz Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Hey Anthony. Yup it should work fine. Even though I use Squeeze Center, I can still see both of the Squeezeboxes listed on SqueezeNetwork (just showing as not connected). So I'm sure the Duet...
- This excellent service from Google will undoubtedly challenge the last bastion of the real estate industry - that issue of providing the address of properties. We have over 80,000 homes for sale...
- Same here. But in my case, i upgraded my system from vista business to vista ultimate. Now it wont switch automatically like it was before. During a song playback (with a headset) it stops when i...
- I dont have any interest in running squeeze center, but I would like to use squeezenetwork. (All I really want this for is to tie to my rhapsody account) Question is (and from what I can tell you...
- Why on earth do you lot deceive people, there are two kind of this tea, one written in English while other written in some foreign language and they both have two different effects, this to my...
4 years ago
4 years ago
Good point about renaming the page - will do. I remember vividly how annoyed and then happy I was when I first discovered this issue!
4 years ago
4 years ago
Dim con2 As New SqlConnection(ConnectionStringHere)
con2.Open()
Dim cmd2 As New SqlCommand("StoredProcName, con2)
cmd2.Parameters.Add("@oneparam", paramvalue)
cmd2.CommandType = CommandType.StoredProcedure
cmd2.ExecuteNonQuery()
''' and BANG.
cmd2.dispose()
con2.close
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.
Any idea?
4 years ago
4 years ago
cmd2.CommandTimeout = 300 (which would be 5 minutes)
4 years ago
4 years ago
Dim mReader as SQLDataReader = mCmd.ExecuteReader () 'This statement returns 28K+ records
While mReader.Read
'Some code to validate data
'Then insertion to a new table using stored procedure.
'Updating of a column in the current data row. The code I written above
End While
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)?
Now any suggestion how to avoid this error while having such heavy datareader?
Thanks,
4 years ago
4 years ago
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).
IS that the real problem? Seems to be so, since when I changed to DataTable it worked fine even more than these rows (28K).
Thanks for your help,
Sameers
4 years ago
Did you try setting the Adapters property to ContinueOnError??
its like
adapter.ContinueUpdateOnError
may be you are getting error at some place in one of the records and
thats where you are stuck !! ??
let me know
3 years ago
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.
Any clue why it takes much longer in the application?
3 years ago
I have the same problem, but none of the suggestions here helped.
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!
Interestingly, in SQL Query Analyzer, the query takes 30 seconds!
3 years ago
Clean, Simple solution, obviously an issue people are coming across, I just hope they find this as well.
3 years ago
my application is timing out before the set timeouts. It is timing out on the dataadapter.fill statement. It used to run fine until
the vendor realized they were missing tons of data in the database and fixed that problem. The query averages 2 minutes
in query analyzer. Any ideas?
3 years ago
That was the key. Thanks!!!! You are awesome! Now if you could only teach Microsoft how to do documentation :-)
2 years ago
2 years ago
2 years ago
Thanks!!!
2 years ago
2 years ago
2 years ago
1 year ago
8 months ago