Home All Groups Group Topic Archive Search About

Q: DataView with Table with large number of rows

Author
13 Dec 2006 4:39 PM
G .Net
Hi

I'm hoping that somebody can help me with the following:

I have a DataTable which I'm displaying in a DataGrid. I am changing values
in this grid which need to be passed back to the DataTable and then back to
the database source.

In the grid, I sometimes only want to show some of the rows i.e. I filter
it. I do this by using a DataView to the DataTable and then filtering the
DataView which is the source to the grid.

All well and good so far!

However, I have recently added several thousand new rows to the DataTable.
When I set the DataView using:

MyDataView.Table = MyDataSet.Table("MyBigTable")
MyDataView.RowFilter = "[Col1] = 2"

However, this takes several seconds to do the first line! There are
approximately 400,000 rows in it. However, using the filter I may only be
drawing out 20 rows.

Can anybody suggest how I can speed this up?

Thanks in advance

G

Author
13 Dec 2006 7:06 PM
yekerui
Hi,

    Did you ever read the article Development guide with OleDBProNet at
http://www.udaparts.com/devguide.htm

    Read it. You'll know the reason.


Show quoteHide quote
"G .Net" <nodamnspam@email.com> wrote in message
news:3dGdnRy6s7tRsR3YnZ2dnUVZ8qaqnZ2d@pipex.net...
> Hi
>
> I'm hoping that somebody can help me with the following:
>
> I have a DataTable which I'm displaying in a DataGrid. I am changing
> values in this grid which need to be passed back to the DataTable and then
> back to the database source.
>
> In the grid, I sometimes only want to show some of the rows i.e. I filter
> it. I do this by using a DataView to the DataTable and then filtering the
> DataView which is the source to the grid.
>
> All well and good so far!
>
> However, I have recently added several thousand new rows to the DataTable.
> When I set the DataView using:
>
> MyDataView.Table = MyDataSet.Table("MyBigTable")
> MyDataView.RowFilter = "[Col1] = 2"
>
> However, this takes several seconds to do the first line! There are
> approximately 400,000 rows in it. However, using the filter I may only be
> drawing out 20 rows.
>
> Can anybody suggest how I can speed this up?
>
> Thanks in advance
>
> G
>
Author
13 Dec 2006 10:06 PM
G .Net
Sorry yererui, I don't follow

G

Show quoteHide quote
"yekerui" <nospam@yahoo.com> wrote in message
news:e1IONnuHHHA.1044@TK2MSFTNGP02.phx.gbl...
> Hi,
>
>    Did you ever read the article Development guide with OleDBProNet at
> http://www.udaparts.com/devguide.htm
>
>    Read it. You'll know the reason.
>
>
> "G .Net" <nodamnspam@email.com> wrote in message
> news:3dGdnRy6s7tRsR3YnZ2dnUVZ8qaqnZ2d@pipex.net...
>> Hi
>>
>> I'm hoping that somebody can help me with the following:
>>
>> I have a DataTable which I'm displaying in a DataGrid. I am changing
>> values in this grid which need to be passed back to the DataTable and
>> then back to the database source.
>>
>> In the grid, I sometimes only want to show some of the rows i.e. I filter
>> it. I do this by using a DataView to the DataTable and then filtering the
>> DataView which is the source to the grid.
>>
>> All well and good so far!
>>
>> However, I have recently added several thousand new rows to the
>> DataTable. When I set the DataView using:
>>
>> MyDataView.Table = MyDataSet.Table("MyBigTable")
>> MyDataView.RowFilter = "[Col1] = 2"
>>
>> However, this takes several seconds to do the first line! There are
>> approximately 400,000 rows in it. However, using the filter I may only be
>> drawing out 20 rows.
>>
>> Can anybody suggest how I can speed this up?
>>
>> Thanks in advance
>>
>> G
>>
>
>
Author
14 Dec 2006 4:51 AM
Cor Ligthert [MVP]
G.

You have always make your choise what to do on the server and what on the
client.

In this sitation it is in my idea completely clear that you should not use
here a dataview but a Where clause in your select statement.

Cor

Show quoteHide quote
"G .Net" <nodamnspam@email.com> schreef in bericht
news:3dGdnRy6s7tRsR3YnZ2dnUVZ8qaqnZ2d@pipex.net...
> Hi
>
> I'm hoping that somebody can help me with the following:
>
> I have a DataTable which I'm displaying in a DataGrid. I am changing
> values in this grid which need to be passed back to the DataTable and then
> back to the database source.
>
> In the grid, I sometimes only want to show some of the rows i.e. I filter
> it. I do this by using a DataView to the DataTable and then filtering the
> DataView which is the source to the grid.
>
> All well and good so far!
>
> However, I have recently added several thousand new rows to the DataTable.
> When I set the DataView using:
>
> MyDataView.Table = MyDataSet.Table("MyBigTable")
> MyDataView.RowFilter = "[Col1] = 2"
>
> However, this takes several seconds to do the first line! There are
> approximately 400,000 rows in it. However, using the filter I may only be
> drawing out 20 rows.
>
> Can anybody suggest how I can speed this up?
>
> Thanks in advance
>
> G
>