Page 1 of 1
Can't connect to MySQL anymore
Posted: Thu Jan 14, 2021 4:10 pm
by Jac de Lad
The following code worked fine on 5.72, but not on 5.73:
Code: Select all
UseMySQLDatabase("Mydtive:\Myfolder\libmariadb.dll")
database=OpenDatabase(#PB_Any,"host=myhost port=3306 dbname=mydb","user","password",#PB_Database_MySQL)
Now it produces a "UseODBCDatabase(), UseSQLiteDatabase() bzw. UsePostgreDatabase() muss vor dem Verwenden von Datenbank-Befehlen aufgerufen werden."
Not a single word about MySQL...
It works with 5.73 Beta 3.
Re: Can't connect to MySQL anymore
Posted: Sat Jan 16, 2021 3:11 pm
by mk-soft
No problem here ... PB v5.72 LTS Win 7
Re: Can't connect to MySQL anymore
Posted: Sat Jan 16, 2021 3:44 pm
by Marc56us
This message is displayed when the path is incomplete or the DLL is not a compatible version.
First of all: if external resources are used, always test their presence before use so as not to leave the end user with no way to identify an error.
Code: Select all
DB_DLL$ = "C:\Program Files\PureBasic\Compilers\libmariadb.dll"
If FileSize(DB_DLL$) <= 0
MessageRequester("Error", "DLL not present")
End
EndIf
UseMySQLDatabase(DB_DLL$)
; ...
Then, is your DLL the version provided with PB 573 (not beta) ?
libmariadb.dll 3.1.9
Re: Can't connect to MySQL anymore
Posted: Wed Feb 03, 2021 12:49 pm
by jacdelad
Hello,
sorry for the late reply. I had problems with my account, for the hundredth time, because Google keeps deleting and moving the emails from here (and some others too). So I had to create a new account, which hopefully works now.
Yes, that helped. I always made sure the file is accessible, but obviously the version had changed and the older one was not usable. Updating the DLL worked.
Thanks!
Re: Can't connect to MySQL anymore
Posted: Thu Feb 04, 2021 7:47 am
by Joris
jacdelad wrote:... because Google keeps deleting and moving the emails from here (and some others too).
Seems like thre are more things that become deleted : jacdelad 106 posts now down to 1 post.
Re: Can't connect to MySQL anymore
Posted: Thu Feb 04, 2021 8:49 am
by jacdelad
Well, not a big loss though.