Speed using a dataadapter and datagrid

G

Guest

I have several forms that use a dataadapter to fill a datatable and display
the records in a datagrid. The first time in my app that any one of these
forms is displayed, it takes a long time to load even when there are only 2
records to display. Any subsequent time that one of these forms is displayed
the speed is fine.

Is there some sort of initialisation thing happening here? Anything that I
can do to increase the speed? Is it the dataadapter, the datatable or the
grid that is causing this?

Thanks in advance for any advice.

Kind Regards,
Matthew Pascoe
 
I

Ilya Tumanov [MS]

On a first run big DataSet code needs to be JITed, which takes some time.
It's not that long, probably around 10 seconds, but you have to wait.


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
G

Guest

Hi Ilya,

Thanks for your reply. Is there another control that I can use instead of
the datagrid that can have mutilple columns with headings but can be
'manually' loaded from a datareader? I just want to load a small number of
records and let the user select one. If I can avoid a dataset, then I would
really like to.

Thanks & Regards,
Matthew
 
I

Ilya Tumanov [MS]

You can use ListView. Or you can use DataGrid with data source other than
DataSet, e.g. ArrayList with custom objects. Keep in mind it's not going to
reduce startup time to zero.



--
Best regards,


Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
G

Ginny Caughey [MVP]

Matthew,

You didn't say what the source of your data was, but if it's a SQL Mobile
table, you might consider using SqlCeResultSet insetad of DataSet as the
DataSource of your grid. It's much faster since the data is only actually
loaded as you scroll through the grid.
 
G

Guest

Hi Ginny,

Thanks for your suggestion, but I am using a direct connection to
SQLServer2000.

Regards,
Matthew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top