SQL Server Developer Center >
SQL Server Forums
>
SQL Server Compact
>
fill data table in background
fill data table in background
- I have a quick question. I am building a mobile app that gets data from sql server. However one of the query returns a large number of records (~ 6000). This causes my app to hang until it's finished. Is it possible to fill a data table in the background? Is yes, can you provide a link to an example or a simple example. Thanks in advance.
Answers
- What query performance have you used, SqlCEDataAdapter or SqlCEDataReader or SqlCEResultSet??
I used SqlCEResultSet to export 4500 record from SDF into Excel, and it finished in 40seconds, nothing trouble
First thing you have to do is changing the way you manipulate data using one of query performance, whether SqlCEDataAdapter or SqlCEDataReader or SqlCEResultSet?? take a look at this site to open your mind about comparing those techniques:
http://msdn.microsoft.com/en-us/library/dd938877.aspx
If you want export import application, you can use data port console or data port wizard from this site:
http://www.primeworks-mobile.com/
I use data port console 1.3 and the update 1.5, it really works for me to export import data from Sql Server into SDF
Regards,
-Harrie-
- Edited byHarrie KalaChakra Thursday, October 29, 2009 2:41 AM
- Marked As Answer byChunSong Feng -MSFTMSFT, ModeratorThursday, November 05, 2009 1:34 AM
- Hi,
Do you really need about 6000 records at once? Why fetch the data which you exactly need to use?
Here is an article about Paging records: http://www.codeproject.com/KB/aspnet/paging_various_databases.aspx
Hope this helps.
ChunSong Feng
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Proposed As Answer byChunSong Feng -MSFTMSFT, ModeratorTuesday, November 03, 2009 4:56 AM
- Marked As Answer byChunSong Feng -MSFTMSFT, ModeratorThursday, November 05, 2009 1:34 AM
All Replies
- What query performance have you used, SqlCEDataAdapter or SqlCEDataReader or SqlCEResultSet??
I used SqlCEResultSet to export 4500 record from SDF into Excel, and it finished in 40seconds, nothing trouble
First thing you have to do is changing the way you manipulate data using one of query performance, whether SqlCEDataAdapter or SqlCEDataReader or SqlCEResultSet?? take a look at this site to open your mind about comparing those techniques:
http://msdn.microsoft.com/en-us/library/dd938877.aspx
If you want export import application, you can use data port console or data port wizard from this site:
http://www.primeworks-mobile.com/
I use data port console 1.3 and the update 1.5, it really works for me to export import data from Sql Server into SDF
Regards,
-Harrie-
- Edited byHarrie KalaChakra Thursday, October 29, 2009 2:41 AM
- Marked As Answer byChunSong Feng -MSFTMSFT, ModeratorThursday, November 05, 2009 1:34 AM
- Hi,
Do you really need about 6000 records at once? Why fetch the data which you exactly need to use?
Here is an article about Paging records: http://www.codeproject.com/KB/aspnet/paging_various_databases.aspx
Hope this helps.
ChunSong Feng
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Proposed As Answer byChunSong Feng -MSFTMSFT, ModeratorTuesday, November 03, 2009 4:56 AM
- Marked As Answer byChunSong Feng -MSFTMSFT, ModeratorThursday, November 05, 2009 1:34 AM
- Thanks for all the suggestions. I'm looking into the paging option. We're also working on minimizing the data results.
- Hello trebak,
If you find any better solutions, don't forget share with us, it will be beneficial to our community members.
ChunSong Feng
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
- I decided to use this ....
In this link you can find (Multithreaded Programming), this videos contain code as well. Try to follow this:
http://msdn.microsoft.com/en-us/netframework/bb495180.aspx


