B4A Library MySQL Connector

Hello,
I'm user of b4a since version 1.2 but I have made only 2 apps. Basically because in 99% of my work I use MySQL database server. Last week my collogues from work ask me for simply app for them. Storing visits of customers on exposition we participate.
I had for that 2 days, and I chose Data Base file stored on the phone, for later send me it by email. (Is on Play Store as MAQUINSER BIEMH). And I realize how really big possibility I could have for our apps If I could use MySQL connector. After 1 week home work, I made one. Now I can use it in very simple way. And I would like to share it, as all of you are sharing your work with me.
Unfortunately is not direct connexion. b4a library is connecting with MySQLConnector (available in zip) which must be installed on PC (Linux or Windows). Can be the same one which have MySQL server or other one.
Fallow example and later you comment :)
Thank you,
Best regards,
Krzysztof

Because zip file (contain Windows and Linux service application) has almost 6MByte.
You can download it from DropBox making click on link.
https://www.dropbox.com/s/vw77g6wjnkh4cob/MySQLConnector.zip
 
Last edited:

kkoninski

New Member
Licensed User
Longtime User
Hi Erel,
Yes I looked at that. My idea was simplify as possibly. No web server necessary, no configuration, no Java, just MySQLConnector I made.
Linux always was complicated for me to set anything :). That's why I wrote this connector. By the way I compiled also for Windows (MAC also is possibly). Simply copy and launch.
At this moment for me is working fine. But if there will be people wont to use it, and have some idea for make it better, I will try to keep continuing developing it.

Thank you,
Regards.
 

kuntasev

Member
Licensed User
Longtime User
I tried the example connecting to my MYSQL server and throws me the following error

** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
java.lang.NumberFormatException: Invalid double: "J������
5.5"
java.lang.NumberFormatException: Invalid double: "!������#"

The MYSQL query that I make is : SELECT * FROM MY_TABLE
 

kuntasev

Member
Licensed User
Longtime User
What I do, is a simple query on the table that I have created.
I put the connector on the same PC that MySQL server in a folder ... and I run.
It ope the command window, without any information.
I have to configure something to run the connector?.

The table is:



CREATE TABLE `tb_control` (
`CTN_ID` int(11) NOT NULL AUTO_INCREMENT,
`CTN_APP` varchar(3) COLLATE latin1_spanish_ci DEFAULT NULL,
`CTN_ID_0` varchar(50) COLLATE latin1_spanish_ci DEFAULT NULL,
`CTN_ID_1` varchar(50) COLLATE latin1_spanish_ci DEFAULT NULL,
`CTN_ID_2` varchar(50) COLLATE latin1_spanish_ci DEFAULT NULL,
`CTN_ID_3` varchar(50) COLLATE latin1_spanish_ci DEFAULT NULL,
`CTN_INST_I` date DEFAULT NULL,
`CTN_INST_F` date DEFAULT NULL,
`CTN_MANT_I` date DEFAULT NULL,
`CTN_MANT_F` date DEFAULT NULL,
`CTN_EMPRESA` varchar(40) COLLATE latin1_spanish_ci DEFAULT NULL,
`CTN_DOMICILIO` varchar(40) COLLATE latin1_spanish_ci DEFAULT NULL,
`CTN_POBLACION` varchar(40) COLLATE latin1_spanish_ci DEFAULT NULL,
`CTN_PROVINCIA` varchar(30) COLLATE latin1_spanish_ci DEFAULT NULL,
`CTN_COD_POSTAL` int(11) DEFAULT NULL,
`CTN_CIF` varchar(13) COLLATE latin1_spanish_ci DEFAULT NULL,
`CTN_N_CREDITO` int(11) DEFAULT '0',
`CTN_N_CREDITOB` int(11) DEFAULT '0',
`CTN_N_ARTICULO` int(11) DEFAULT '0',
`CTN_NOTAS` blob,
`CTN_ESTADO` char(1) COLLATE latin1_spanish_ci DEFAULT '-',
`CTN_AVISO` char(1) COLLATE latin1_spanish_ci DEFAULT '0',
`CTN_USER` varchar(60) COLLATE latin1_spanish_ci NOT NULL DEFAULT '',
`CTN_VI` varchar(30) COLLATE latin1_spanish_ci DEFAULT NULL,
`CTN_VF` varchar(30) COLLATE latin1_spanish_ci DEFAULT NULL,
PRIMARY KEY (`CTN_ID`,`CTN_USER`),
KEY `CTN_ID_0` (`CTN_ID_0`),
KEY `CTN_ID_1` (`CTN_ID_1`),
KEY `CTN_APP` (`CTN_APP`),
KEY `CTN_EMPRESA` (`CTN_EMPRESA`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;
 
Top