PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [TUTORIAL] SQLite Spy  (Read 3139 times)

Ivan Iraola

  • Junior Member
  • **
  • Posts: 97
  • Windows 7 Pro
    • UncleDroid Apps
[TUTORIAL] SQLite Spy
« on: December 11, 2009, 09:41:56 PM »

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
« Last Edit: December 12, 2009, 09:35:23 AM by Ivan Iraola »
Logged
Android App Developer
http://www.uncledroid.com

Rolf Brandt

  • Master Member
  • ****
  • Posts: 933
  • XP Pro SP3 - Vista - Win7
    • Taxi Dispatching Systems
Re: [TUTORIAL] SQLite Spy
« Reply #1 on: December 12, 2009, 04:19:04 AM »

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.
« Last Edit: December 12, 2009, 05:32:47 AM by Rolf Brandt »
Logged
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

  • Junior Member
  • **
  • Posts: 97
  • Windows 7 Pro
    • UncleDroid Apps
Re: [TUTORIAL] SQLite Spy
« Reply #2 on: December 12, 2009, 09:04:15 AM »

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.
« Last Edit: December 12, 2009, 09:12:17 AM by Ivan Iraola »
Logged
Android App Developer
http://www.uncledroid.com

Rolf Brandt

  • Master Member
  • ****
  • Posts: 933
  • XP Pro SP3 - Vista - Win7
    • Taxi Dispatching Systems
Re: [TUTORIAL] SQLite Spy
« Reply #3 on: December 12, 2009, 09:16:45 AM »

Hello Ivan,

Quote
I 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.
Logged
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

  • Junior Member
  • **
  • Posts: 97
  • Windows 7 Pro
    • UncleDroid Apps
Re: [TUTORIAL] SQLite Spy
« Reply #4 on: December 12, 2009, 09:25:50 AM »

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" 
Logged
Android App Developer
http://www.uncledroid.com

Rolf Brandt

  • Master Member
  • ****
  • Posts: 933
  • XP Pro SP3 - Vista - Win7
    • Taxi Dispatching Systems
Re: [TUTORIAL] SQLite Spy
« Reply #5 on: December 12, 2009, 09:31:18 AM »

Quote
Did 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.
Logged
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

  • Junior Member
  • **
  • Posts: 97
  • Windows 7 Pro
    • UncleDroid Apps
Re: [TUTORIAL] SQLite Spy
« Reply #6 on: December 12, 2009, 09:33:44 AM »

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)
« Last Edit: December 12, 2009, 09:36:17 AM by Ivan Iraola »
Logged
Android App Developer
http://www.uncledroid.com

Rolf Brandt

  • Master Member
  • ****
  • Posts: 933
  • XP Pro SP3 - Vista - Win7
    • Taxi Dispatching Systems
Re: [TUTORIAL] SQLite Spy
« Reply #7 on: December 12, 2009, 09:35:55 AM »

That was quick...
Logged
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

  • Junior Member
  • **
  • Posts: 97
  • Windows 7 Pro
    • UncleDroid Apps
Re: [TUTORIAL] SQLite Spy
« Reply #8 on: December 12, 2009, 09:40:27 AM »

That was quick...

With the right help, things can be done quickly  ;D
Logged
Android App Developer
http://www.uncledroid.com