• Welcome to PlanetSquires Forums.
 

[TUTORIAL] SQLite Spy

Started by Ivan Iraola, December 11, 2009, 09:41:56 PM

Previous topic - Next topic

Ivan Iraola

This little app will display basic info about the selected database: Tables in database, Fields of each table, total rows in database, size of the database.

Requirements:

  - FireFly 3.04
  - The extra SQLitening functions found on THIS thread.


Specs:

  - Format         : Project
  - Compiler       : PB9
  - GUI Designer : FireFly 3.04
  - Language     : English

NOTE: This is an updated version of the tutorial. Uploaded on Dec 12, 2009
Android App Developer
http://www.uncledroid.com

Rolf Brandt

#1
Hello Ivan,

you should make clear that your 'Extra functions' are needed in the Functions Library. Otherwise you cannot compile, you will get a 'Missing Declaration' error. I had overlooked it first. Though I like the extra functions I think it might be a better idea to them into an include file for projects put on the forum. Not everybody might want to use all the personal extensions to the Functions Library. With the rising number of samples and tutorials this might become a problem. (This is of course just my personal opinion!)

Anyway - a nice SQLitening tool. But it did not work correctly for me. I used the sample.db3 in which I had inserted two additional tables (Test1 and Test2). It showed for Test1 correctly 7 records, but it showed for Test2 10,000 and for Parts 0 records. Should have been vice versa. Also the number of fields for the tables were not shown. I didn't get a chance to look into the code in detail, but shouldn't be to difficult to correct this.
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Ivan Iraola

#2
I did mention the extra functions, maybe I should BOLD the link.

Can you send me the database you used to test?, I made some here while I was testing the code and had no problems, I'd like to take a look at it myself.

If I made a boo-boo somewhere please let me know.
Android App Developer
http://www.uncledroid.com

Rolf Brandt

Hello Ivan,

QuoteI did mention the extra functions, maybe I should BOLD the link.

Just as I said I had not noticed that right away.

Attached is the database and a screenshot.
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Ivan Iraola

Hmmmm, interesting.

Quote
Also the number of fields for the tables were not shown

Did you double click on the TABLE row?, by doing that you populate the FIELDS listview, on your example, the table TEST has these fields "Name" "VorName" and TEST2 these fields "gggggggg", "sssssssssss" and "Text1" 
Android App Developer
http://www.uncledroid.com

Rolf Brandt

QuoteDid you double click on the TABLE row?

You are of course right! I did not! It is sometimes the most simple things you don't get on. That works of course perfect. Sorry about that.
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Ivan Iraola

#6
FIXED!!!!

The problem was that the ListView containing the TABLES had the SORT ASCENDING property set, I have removed that, now it will display the info correctly.

Thanks for helping me spot that bug.  8)
Android App Developer
http://www.uncledroid.com

Rolf Brandt

Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Ivan Iraola

Android App Developer
http://www.uncledroid.com