Page 1 of 1

Trying 32 bits apps to access mariaDB database without success...

Posted: Sun May 16, 2021 6:21 pm
by Golfy
Hi there,
I'm trying to access a remote mariadb database with this code (password is hidden but is ok) :

Code: Select all

UseMySQLDatabase()

chrono$="2021-04-20 15:25:00"
capteur$="01-1"
temperature$="18.5"

idBDD = OpenDatabase(1, "host=192.168.168.248 port=3306 dbname=velbus", "Velbus", "******")
Debug idBDD
er=DatabaseUpdate(idBDD, "INSERT INTO temperature (dateRecord, idModPart, temperature) VALUES ('"+chrono$+"', '"+capteur$+"', '"+temperature$+"')")
Debug er
CloseDatabase(idBB)
unfortunately, I've got this error and I don't know why :
Image

PC is running Windows XP SP3 (it's an old solution but Purebasic isn't working on Raspbian, so my Raspberry should use another language to replace it).
I've tried to put a libmariadb.dll in C:\Program Files\PureBasic\Compilers without success.

Any idea on how to resolve this problem ? thanks a lot by advance.

Re: Trying 32 bits apps to access mariaDB database without success...

Posted: Sun May 16, 2021 7:12 pm
by mk-soft
Even if Purebasic still runs on Window XP (even though it is discontinued), the external library libMariaDB will no longer support Windows XP.
Alternatively install the "MySQL ODBC 3.51 Driver" and set up a DSN via "ODBCAD32.exe" (ODBC).

I tested it under XP and PB v5.73 with a small application on my NAS database.