Recent

Author Topic: FreePascal + Lazarus+ Android + databases  (Read 7698 times)

Giu

  • Full Member
  • ***
  • Posts: 131
FreePascal + Lazarus+ Android + databases
« on: February 29, 2012, 08:45:14 pm »
Hi all,

Right now, is possible to access sqlite databases on an Android app created under Lazarus?
We have a little project about customers management we are thinking to take it with Laz.

Regards.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: FreePascal + Lazarus+ Android + databases
« Reply #1 on: March 01, 2012, 08:50:33 am »
I never tried myself, but I think it should work. You will need to build, or find a pre-build sqlite .so library compiled for Android since this library is not part of Android.

If you want to use data-aware components, then you will need to merge revision 20267 to your compiler. My pre-build compiler currently does not have this revision (since I commited it after building my snapshot compiler). See http://bugs.freepascal.org/view.php?id=21208

I have an important project which will be based in LCL-CustomDrawn-Android, so I will in the next months be doing a lot of work on it. But in general people using it right now should take a "hands on" atitude and send patches or otherwise contribute because not all controls are implemented and I can't do everything alone, specially hard to implement controls like the grid and listview =) But except for that the current base is pretty solid, it was tested in a wide range of devices and works well everywhere.

The basic controls like button, image, edit, label, TCustomControl descendents, TGraphicControl descendents are all working.

The currently implemented controls are listed here:

http://wiki.lazarus.freepascal.org/Roadmap#Status_of_native_controls_on_each_widgetset

wcleyton

  • Jr. Member
  • **
  • Posts: 80
Re: FreePascal + Lazarus+ Android + databases
« Reply #2 on: March 01, 2012, 01:47:01 pm »
I had trouble adding a DataSource in the project. I opened the BugTracker 21208 and with the change in the file:

fmtbcd.pp changed line 46 to {$r+,q+,s-} to turn off stack checking.

The system worked perfectly with no problems DataSource.

jixian.yang

  • Full Member
  • ***
  • Posts: 173
Re: FreePascal + Lazarus+ Android + databases
« Reply #3 on: March 01, 2012, 04:27:34 pm »
TCDListview can be regarded as a style of TCDGrid which is very intresting. According to the roadmap, the TBitBtn is so simple, and so is TCheckGroup and TCheckListBox where TStringList is working perfectly.

Giu

  • Full Member
  • ***
  • Posts: 131
Re: FreePascal + Lazarus+ Android + databases
« Reply #4 on: March 12, 2012, 09:59:53 pm »
Sorry for the delay in the reply.

There are some posibility, if someone has a little example, with source, using sqlite to test it, in my 7" tablet, and show the code ho is implemented? and show it to my partner? He is the Android developer and since I told him about Android app developed under Lazarus, is excited (we are long Borland fans)

Regards

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: FreePascal + Lazarus+ Android + databases
« Reply #5 on: March 13, 2012, 04:11:40 pm »
So, the first step is getting a sqlite.so for Android. You need to find a pre-compiled one or build one yourself and then post here. With that library I could try to make an example application for you. Although I would consider also using DBF or something else which requires no external packages.

tatamata

  • Hero Member
  • *****
  • Posts: 693
    • ZMSQL - SQL enhanced in-memory database
Re: FreePascal + Lazarus+ Android + databases
« Reply #6 on: March 30, 2012, 09:21:20 pm »
zmsql package has no external dependancies.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: FreePascal + Lazarus+ Android + databases
« Reply #7 on: March 31, 2012, 09:22:47 am »
zmsql package has no external dependancies.

Nice, I didn't know about it, although the mention in the wiki page that it is Alpha is a bit disapointing:

http://wiki.lazarus.freepascal.org/ZMSQL

Any comments on it's quality? I surely could use it a lot in my own projects.

tatamata

  • Hero Member
  • *****
  • Posts: 693
    • ZMSQL - SQL enhanced in-memory database
Re: FreePascal + Lazarus+ Android + databases
« Reply #8 on: March 31, 2012, 09:37:46 am »