Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Fastest way to display SQLite data?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-05-2008, 10:05 PM
Basic4ppc Veteran
 
Join Date: Dec 2008
Posts: 203
Awards Showcase
Beta Tester 
Total Awards: 1
Default Fastest way to display SQLite data?

Having a go with SQLite and started with the supplied sample application SQL.
This displays the data like this:
cmd.ExecuteTable("table1", 0)
but I find it is quite slow. Not sure if the select query is slow or the moving of the data to the grid, but I suspect the last.
What is the fastest way to do this?
Are there other options then using the supplied dll from phxsoftware?

RBS
Reply With Quote
  #2 (permalink)  
Old 12-06-2008, 06:01 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

How many records (rows * columns) do you want to show?
Reply With Quote
  #3 (permalink)  
Old 12-06-2008, 08:36 AM
Basic4ppc Veteran
 
Join Date: Dec 2008
Posts: 203
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Yes, you probably hit the nail on the head there, I was showing a large amount of data, say 50.000 * 10. And I suppose there is little point in that. I was comparing getting this into Excel with showing that on the PPC and in Excel I can do that in some 10 secs, but on the PPC it will take some minutes.
One thing I noticed with the supplied SQLite library is that you can't get the data straight from SQLite into a plain array and deal with the display of the data yourself. Am I overlooking something?

RBS
Reply With Quote
  #4 (permalink)  
Old 12-06-2008, 08:47 AM
Basic4ppc Veteran
 
Join Date: Dec 2008
Posts: 203
Awards Showcase
Beta Tester 
Total Awards: 1
Default

I forgot to say that if I run it with the Basic4ppc desktop app it runs very quick so the slowness has nil to do with the supplied SQLite library, but it must be the table control that is used here.

RBS
Reply With Quote
  #5 (permalink)  
Old 12-06-2008, 09:09 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Don't forget that devices are very underpowered compared to desktops so don't expect too much performance from them.
Reply With Quote
  #6 (permalink)  
Old 12-06-2008, 09:46 AM
Basic4ppc Veteran
 
Join Date: Dec 2008
Posts: 203
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Yes and I don't in fact need to show large amounts of data and was just doing some testing. So, all in all I don't think there is a problem. Will do some testing now with some taxing SQL, but small amount of records to see what happens there.

RBS
Reply With Quote
  #7 (permalink)  
Old 12-06-2008, 10:05 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The power of the SQL language is that it allows you to retrieve only the data you need.
As you wrote, in most cases it is not pretty useful from a user perspective to have a list with 50,000 rows.
Reply With Quote
  #8 (permalink)  
Old 12-06-2008, 10:20 AM
Basic4ppc Veteran
 
Join Date: Dec 2008
Posts: 203
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Sure, fully agree there.
Is there a way though to get data from SQLite (ideally in a plain array) without outputting it to a control?

RBS
Reply With Quote
  #9 (permalink)  
Old 12-06-2008, 01:08 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Yes, with ExecuteReader.
Reply With Quote
  #10 (permalink)  
Old 12-06-2008, 01:32 PM
Basic4ppc Veteran
 
Join Date: Dec 2008
Posts: 203
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Ah, yes, I see now. Reader is a kind of Recordset?

RBS
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sqlite Data Sequence ceaser Questions (Windows Mobile) 2 07-29-2008 11:03 AM
Data collection from devices to Desktop using SQLite mozaharul Questions (Windows Mobile) 3 04-03-2008 10:00 AM
FASTEST way to make a RND number list, no doubles Stellaferox Questions (Windows Mobile) 8 02-06-2008 12:16 PM
fastest way to search in database Put Claude Questions (Windows Mobile) 14 10-10-2007 08:53 PM
Fastest way to get pixel colour value? DavidN Questions (Windows Mobile) 6 09-02-2007 06:40 AM


All times are GMT. The time now is 03:27 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0