DataView issues

  • Thread starter Thread starter koredump
  • Start date Start date
K

koredump

Hi,

I'm working on fixing a bug in a very data intensive windows
application. The application has a datagrid that binds to a dataview.
The dataview can hold as many as 40000 records that are retrieved from
two tables with a join. The user filters the dataview to display a
subset of the 40000 records. All data gets loaded on FormLoad(). From
time to time the dataview ends up with zero records w/o any exceptions
being thrown. If there was some kind of an exception thrown I would
know where to start in fixing this problem, but since there is no
exception I can only think of rewriting how the data get retrieved and
limit the number of records. Is there a limit on how much data or
recrods a dataview can hold? Why would the dataAdapter fill the
dataset that the dataview drives from one time and not another?
Any helpful hints?

rys
 
Koredump,
The first thing I'd do is refactor this so that the user can select their
filter items and THEN you go get the data. You'll find that approach to be
faster and a lot easier to work with.

Regarding your getting zero rows on occasion, haven't a clue, you'll need to
post some working sample code so people can take a look at your logic.
Peter
 
Hello koredump,

I've stumble over several issues related this problem.
First one, is when we are applying filter, it sometimes applys on the our
existed filter w/out clearing it, and of course our datagrid is empty.
We need to clear former filter and be sure that it's really clear.

Second one is thread issue, when we are performing selecting/filtering in
separate thread and return result to the main thread. There you need to examin
you tread model and apply locks and use delegate where is required.

k> I'm working on fixing a bug in a very data intensive windows
k> application. The application has a datagrid that binds to a
k> dataview.
k> The dataview can hold as many as 40000 records that are retrieved
k> from
k> two tables with a join. The user filters the dataview to display a
k> subset of the 40000 records. All data gets loaded on FormLoad().
k> From
k> time to time the dataview ends up with zero records w/o any
k> exceptions
k> being thrown. If there was some kind of an exception thrown I would
k> know where to start in fixing this problem, but since there is no
k> exception I can only think of rewriting how the data get retrieved
k> and
k> limit the number of records. Is there a limit on how much data or
k> recrods a dataview can hold? Why would the dataAdapter fill the
k> dataset that the dataview drives from one time and not another?
k> Any helpful hints?
k> rys
k>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Peter,
First of all thanks for your reply. Just so you know, I'm not a C#
expert and do programming as a side job. Anyway I completely agree
with you that the code needs to be refactored. I didn't design this
app. I was called in to fix this one problem and only that one
problem. The client wants a quick fix. From what I see in the code
the dataset in question feeds several other datagrids and is used for
updates/inserts/deletes and everything was designed with VS data
wizards. Applicatin doesn't have a data tier (basically it's a form
centric application). According to the client everything was working
fine until last week. I installed the app on my own pc and are only
getting an empty dataview/dataset sporadically (the client claims to be
getting every single time). I was thinking that ,since it takes a very
long time to load all the data, maybe the connection the the ms sql
2000 server is somehow timing out (but that shouldn't that throw an
exception?). It's almost seems that the data has grown to a point that
it can not be handled by the application. I will see whether I can
post any code that will be meaningful.
 
Back
Top