Click here to Skip to main content
15,891,375 members

Comments by Bert Mitton (Top 18 by date)

Bert Mitton 27-Feb-14 10:58am View    
I've done background threading, that's no problem (and was actually going to be a fallback).

I was just hoping to understand WHY we are having this problem, w/o an error (even if it's a timeout)...

So far, this seems to be the best solution, although I hate unsolved mysteries. :)
Bert Mitton 27-Feb-14 6:12am View    
I am unsure of the connection speed, but it is a high-speed, not dialup.

It happens on random queries, and we've seen it "catch" on queries which normally take milliseconds, so it shouldn't be a time-out issue.

Also, looking at the server resources, we're not even close to red-lining, so it's not a load issue.
Bert Mitton 27-Feb-14 6:10am View    
da.Fill(ds) is where we are getting the hang. The interruption happens 2 or 3 times a day, and for short durations, so I don't have time to ping the server.

We do see it manifest itself elsewhere... print jobs from other software sent over the network at that time will be delayed, Remote Desktop sessions will "hang", but recover once the disruption clears.

Our IT team is satisfied as long as the print jobs eventually pop through, and the Remote Desktops recover. This leaves me in a position where I would have to get my own software to recover, but without an error to trap, I don't know how.

Also, in these instances it seems the timeout isn't doing anything either. The process just never returns.

Thanks

Bert Mitton 15-Jan-13 12:53pm View    
Did you try the solution above?

I can only help you so much, since we can't see the actual datatables.

In your original question, you were missing a column. Therefore, it may have looked like a duplicate record, however each record actually had a different fee type of fee amount.

In your follow up, you had reduced the number of columns. That's fine, however you could have had a duplicate record in this instance because you weren't summing the FeeAmount.

Now, you could try SELECT DISTINCT. This will return only a single unique record when there are similar records.

This would be useful if you wanted to determine the permutations of Regno, ST_Name, and FeeAmount actually stored in the table.

However, you would want to be careful. As an example, if I was looking at a sales order table, and wanted a list of all customer with an open sales order, I could use distinct.

But say I want to know the size of the orders. I could query for customer and sales dollars. But there could be two orders with the same dollar value. Using SELECT DISTINCT would hide this data, and only return a single row.

In general, if you're looking for data from a table, do not use DISTINCT. DISTINCT should only be used if you are looking to find out what values are stored in a table, without regard to the frequency.
Bert Mitton 15-Jan-13 12:09pm View    
I believe you tried :)

But it still looks like you're missing some columns.

On your datagridview, try setting AutoGenerateColumns = True.