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

Just starting out? Need help? Post your questions and find answers here.
Golfy
User
User
Posts: 97
Joined: Wed Mar 21, 2012 6:10 pm

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

Post 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.
User avatar
mk-soft
Always Here
Always Here
Posts: 6201
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

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

Post 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.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply