473,670 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataView issues

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

Apr 10 '06 #1
3 1630
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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"koredump" wrote:
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

Apr 10 '06 #2
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
Apr 10 '06 #3
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.

Apr 10 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2089
by: Raymond Lewallen | last post by:
I have a dataview in which the sort property will not sort the dataview. Here's is a simple scenario similar to what I am doing: Class Foo Private Function Retrieve() As DataView ' Returns a DataView with 2 columns and 3 rows Dim ADOHelper As New DAL.ADOHelper Return ADOHelper.GetMyDataview() End
1
6779
by: GeraldBauer | last post by:
I am experiencing some weird behaviors with the listbox and dataview. Here is a boiled down code snippet of what I am trying to do. <snippet> string MENUID = "MenuId" , ITEM = "Item" , MENU_ENTRY_ID = "MenuEntryId"; private void populateMenu() {
1
4015
by: Tim | last post by:
Hi Guys, I have a situation where I have a grid loaded with data. It is not data bound. Clicking an image opens up another form that allows the change of the data in the grid. Right now the changed data (1 row) is written to the DB and the whole grid is reloaded from the DB which now incorporates the change. My question is can I update the data in a data view? That way I can
2
3297
by: Alpha | last post by:
I have a window application. In one of the form, a datagrid has a dataview as its datasource. Initial filtering result would give the datavew 3 items. When I double click on the datagrid to edit the selected lie item at which case I would pop up a separate dialog box to do so, in the debugging code, the dataview.count would return 0. I get a error message because I tried to get values out of a dataview that holds 0 items. Does anyone...
1
5982
by: uni | last post by:
Hi, If I use session state mode=InProc, my session variable for the dataview object is working fine, but if I change the mode to StateServer, I got the error message saying: The type System.Data.DataView in Assembly System.Data, Version=1.0.3300.0, Culture=neutral, ...... is not marked as serializable. How could that be and how can I get around with it?
5
8824
by: David Wender | last post by:
I want to create a dataview with a sort on multiple columns. However, when I use FindRows, I only want to search some of the columns, not all. Is this possible? I have not been able to make it happen. Dim objKeys(2) as Object objKeys(0) = "CL" objKeys(2) = 4000 Dim posView As DataView = New DataView(posDS.Tables("Positions"), _
3
10244
by: randy1200 | last post by:
I have a DataView (dv) that includes a StartDate DateTime column. I'd like to return the DataView record that contains a StartDate value closest to my IncidentDate value: string filter = String.format("StartDate nearest {0}", IncidentDate); dv.Rowfilter = filter; Of course, there's no nearest function.
0
2143
by: Pravin Pujari | last post by:
Hi All, I am using .net framework 1.1 and c#. I have one problem regarding dataview. I have one dataview to which sorting may be applied or may not be applied. I have one UI component where I am displaying the dataview. All rows in dataview are displayed in the sequence as they appear in dataview. i.e. there is direct mapping between dataview rows and UI rows. I have subscribed ColumnChanged event of the datatable on which dataview is...
2
12605
by: Duggi | last post by:
Hi I have a dataview dv, in which one of the column is a date time column. I would like to apply filter on this column. The filter should be some thing like "All the rows that has the date time between DATE1 and DATE2".
0
8469
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8814
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8592
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7419
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5684
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4391
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2800
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.