Recent

Author Topic: Android + Mysql...  (Read 10336 times)

amartitegui

  • Jr. Member
  • **
  • Posts: 82
Android + Mysql...
« on: November 15, 2017, 04:37:53 pm »
Has anyone made something with lazarus-android with mysql?
Tsqlconnector wont work? what external library could be used?
I know Oracle has connector/j & connector/node.js
but...

Any comments helpfull.
thanks

Handoko

  • Hero Member
  • *****
  • Posts: 3053
  • My goal: build my own game engine using Lazarus
Re: Android + Mysql...
« Reply #1 on: November 15, 2017, 05:04:33 pm »
You can try jSqliteDataAccess and jSqliteCursor.

FYI, there are many demos you can try and see how they work. They're inside your LAMW_folder\trunk\demos.

amartitegui

  • Jr. Member
  • **
  • Posts: 82
Re: Android + Mysql...
« Reply #2 on: November 15, 2017, 05:47:44 pm »
But can connect to Mysql server?
I allready have Mysql server running for many machines changing data at factory.
Just want to Make tablets been able to see data too.
With B4A there is a mysql conenctor and tested and worked fine.
The interesting part of it uits that i have created some application modules for slower machines with lazarus. And event Im thinking about conventing the whole project to lazarus.
The real usefull part of android with lazarus is to use same classes and functions. full units. within android program. Even if i gotta change the controls (regular Os buttons, etc).... well that does not worries me.
So, Mysql it soeems important to the idea. Thats why i asked.
As I know there are mysql connectors for java...
well if someone know something.... thankfull

jmpessoa

  • Hero Member
  • *****
  • Posts: 1358
Re: Android + Mysql...
« Reply #3 on: November 15, 2017, 06:18:45 pm »


What about  access your server ( Mysql  or any...) via http?
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

amartitegui

  • Jr. Member
  • **
  • Posts: 82
Re: Android + Mysql...
« Reply #4 on: November 15, 2017, 07:04:09 pm »
Its a solution. or it may be.

Other may be..:
Zeos? anyone tryied with android?
also read something about MorMot.... dont know if it works though ...
and have a couple of other things i want to check.

but it's possible to arrange something eith http:... using synapse. 'cause synapse works within lazarus+android right?
I allready have something built with synapse that may work.

amartitegui

  • Jr. Member
  • **
  • Posts: 82
Re: Android + Mysql...
« Reply #5 on: November 15, 2017, 07:11:20 pm »
Zeos uses external connector.... so one down.

amartitegui

  • Jr. Member
  • **
  • Posts: 82
Re: Android + Mysql...
« Reply #6 on: November 16, 2017, 07:23:23 am »
NOpe... as far a as I've seen no way, unless webserivce/http
thanks

jmpessoa

  • Hero Member
  • *****
  • Posts: 1358
Re: Android + Mysql...
« Reply #7 on: November 16, 2017, 04:49:33 pm »

Quote
NOpe... as far a as I've seen no way, unless webserivce/http ....

A simple "CGI/Rest/RestFull"  is enough.....

In fact what you need is a  mySQL ".so" client for android ....
[I know there is a ".so" firebird client for android... but I never tested it...]
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

amartitegui

  • Jr. Member
  • **
  • Posts: 82
Re: Android + Mysql...
« Reply #8 on: November 17, 2017, 12:40:43 pm »
foun this interesting matter bout  synopse/mormot.
Have you ever try to work with mormot?

http://blog.synopse.info/post/2013/09/19/FreePascal-Lazarus-and-Android-Native-Controls

amartitegui

  • Jr. Member
  • **
  • Posts: 82
Re: Android + Mysql...
« Reply #9 on: November 17, 2017, 12:42:53 pm »
Also found somthing like this to try.
https://github.com/0x-ff/libmysql-android

amartitegui

  • Jr. Member
  • **
  • Posts: 82
Re: Android + Mysql...
« Reply #10 on: November 17, 2017, 01:49:06 pm »
Furthermore, take a look at this guy's info.
Very interesting... and maybe someone also needs o its interested in this.
https://mymegabyte.com/2011/03/cross-compile-libmysql/

got to it from: http://www.qtcentre.org/threads/56202-mysql-plugin-on-android-requires-libmysqlclient_r-so-built-with-android-toolchain

amartitegui

  • Jr. Member
  • **
  • Posts: 82
Re: Android + Mysql...
« Reply #11 on: November 17, 2017, 01:54:08 pm »
and... finaly yes.
Im gonna try all that stuf or compile (or try to compile the lib)
found many info about it using NDK.

amartitegui

  • Jr. Member
  • **
  • Posts: 82
Re: Android + Mysql...
« Reply #12 on: November 17, 2017, 06:33:32 pm »
I thought I got it.
Mysql found library.
BUT and its a big BUT, there is an error using SQLDBLaz. When compiling appears the famous

Messages, Hints: 2
Verbose: Selected chip architecture: armeabi-v7a
Verbose: Taking libraries from folder: C:\lamw\projects\ALFONSO_TEST_1\test_mysql\libs\armeabi-v7a
Verbose: Found library: libcontrols.so
Note: Duplicate unit "controls" in "controls", orphaned ppu "C:\lamw\projects\ALFONSO_TEST_1\test_mysql\obj\controls\controls.o"
Note: Duplicate unit "controls" in "LCLBase 1.7", ppu="C:\lamw\laz4android\lcl\units\arm-android\controls.ppu", source="C:\lamw\laz4android\lcl\controls.pp"
Compile package CodeTools 1.0.1: Aborted
Compile package LCL 1.7: Exit code 1, Errors: 1
gtk2cellrenderer.pas(30,3) Fatal: Cannot find gtk2 used by Gtk2CellRenderer of package LCL.
Ideas?


amartitegui

  • Jr. Member
  • **
  • Posts: 82
Re: Android + Mysql...
« Reply #13 on: November 17, 2017, 06:46:51 pm »
Should I go with Zeos?

amartitegui

  • Jr. Member
  • **
  • Posts: 82
Re: Android + Mysql...
« Reply #14 on: November 17, 2017, 07:03:02 pm »
Uses LCL too.
 :'(