Page 3 of 3
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 18 Apr 2018, 07:31
by needle
just me wrote:
The project was cancelled, and currently I havn't time as well as interest to continue the work on the class script. It might be useful anyway, that's why it's here:
Hello everybody,
I need to connect a script I wrote to a MariaDB and I'd like to know if these are the latest and most complete SQL libs or there have been further developments: all the info I'm finding is several years old.
Thanks a lot!
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 17 Aug 2018, 08:00
by Elendiar
Hi, thanks you for usefull scripts, but i have and issue.
Try connect to server, reject with message:
Connection failed!
2026 - SSL connection error: Unable get certificate
Connection from HeiduSQL successfull, connect to another server through lib successfull too. How can i disable ssl or connect and ignore this ? I have no access to sql server, nead read data. What can it be ?
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 27 Nov 2018, 09:40
by kyuuuri
Hello, i have a problem with libmysql.dll
I get this error when running MySQLAPI_demo.ahk:
"could not load" (path to libmysql.dll / it is the same folder as the demo.ahk) ... "is not a valid win32 app".
I already downloaded all x32 versions from here
https://downloads.mysql.com/archives/c-c/ and none of those work, even tried the x64 ones and i get the same error.
Any help is appreciated, thank you.
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 27 Nov 2018, 10:12
by kyuuuri
kyuuuri wrote: ↑27 Nov 2018, 09:40
Hello, i have a problem with libmysql.dll
I get this error when running MySQLAPI_demo.ahk:
"could not load" (path to libmysql.dll / it is the same folder as the demo.ahk) ... "is not a valid win32 app".
I already downloaded all x32 versions from here
https://downloads.mysql.com/archives/c-c/ and none of those work, even tried the x64 ones and i get the same error.
Any help is appreciated, thank you.
I solved it, i feel stupid, i was running the .ahk with ahk 64 bits hahaha. You have to run it with x32.
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 04 Jan 2019, 09:51
by iaveto
Hi just me!
I tried to connect to my database using your class but got a message box with this:
Query:
(here is my query)
Result:
Name =
Value =
What should I do?
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 05 Jan 2019, 03:11
by just me
iaveto wrote:What should I do?
At least you should post your code. I'm not a MySQL expert, but others here might be able to answer your question.
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 19 Mar 2019, 00:48
by cdkdang
Can someone tell me what the array format of Fetch_Row() is?
Normally i use print_r in php to find out but apparently there's no equivalent for ahk.
thanks
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 19 Mar 2019, 04:33
by just me
MYSQL_ROW
Excerpt from the class code:
Code: Select all
; ===================================================================================================================
; Returns the values of the next row of the given MYSQL_RES as an array.
; Parameters: MYSQL_RES - Pointer to a MYSQL_RES structure.
; Return values: Array of values, False if there is no more row
; ===================================================================================================================
GetNextRow(MYSQL_RES) {
If (MYSQL_ROW := This.Fetch_Row(MYSQL_RES)) {
Row := []
Lengths := This.Fetch_Lengths(MYSQL_RES)
Loop, % This.Num_Fields(MYSQL_RES) {
J := A_Index - 1
If (Len := NumGet(Lengths + 0, 4 * J, "UInt"))
Row[A_Index] := (StrGet(NumGet(MYSQL_ROW + 0, A_PtrSize * J, "UPtr"), Len, "UTF-8"))
Else
Row[A_Index] := ""
}
Return Row
}
Return False
}
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 16 Apr 2019, 01:41
by cdkdang
Just a reminder to myself and anyone else who are having the "Could not find [path]\libmysql.dll"
Just downloading the dll and having it in the script path is not enough.
The operating system actually has to have the appropriate libmysqlclient installed.
Once that is installed, having a correct copy of the libmysql.dll in the script path is sufficient.
Maybe change the error message from "could not find" to "could not load", as the first message indicates a location issue.
Probably self evident to anyone with half a brain, but I wasted days on finding and downloading various libmysql.dll and putting them into various folders (script folder, modules folder, system32, root, etc).
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 16 Apr 2019, 20:04
by Klarion
@cdkdang
nice
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 03 May 2019, 16:16
by manehscripts
Hello, the program works perfectly but I wanted to know how do I enable the connection of any IP? In order to make it work, I had to register my IP on the DB Server. I need to release access to everyone who needs to use the program. Thanks!
Solved: I just gave the permission with (%) on my server to everyone.
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 09 Aug 2019, 15:52
by hot hot 85
I was looking in the library for command to close the connection but I , didn't find it , some one knows how can i do it?
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 10 Aug 2019, 05:38
by just me
There's a Close() method called internally when the DB object is destroyed (e.g. MyDB := ""). External calls might need some additional actions on the DB object.
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 07 Nov 2019, 12:12
by chelste1824
I want all the stored mac back in the database but I can't find how to do it, I can't find the necessary function, example GetNextRow, help me, plz
SQL= select macpc from registro
+--------------+
| macpc |
+--------------+
| xxxxxxxxxxxx |
| yyyyyyyyyyyyyy |
| zzzzzzzzzzzzzz |
+--------------+
example.
resp:=Result(SQL)
Msgbox % resp
---------------------------------------
;Print
xxxxxxxxxxxx
yyyyyyyyyyyyyy
zzzzzzzzzzzzzz
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 02 Jan 2022, 04:56
by william_ahk
DBGVIEWCLEAR[ERROR] SSL error: Unable to get certificate from ''.
I'm also having this issue with the latest dll of MySQL 8.0. Oddly the
AHK DBA library works.
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 25 Jan 2022, 07:06
by Skywalker
Hi Wiliam,
i also try at the moment to connect with SSL to MySQL
With Heidi everthing works fine, but i cannot get a connection with AHK and DBA
Do you have a hint for me ?
Thank you so much in advance!
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 09 Feb 2022, 07:00
by william_ahk
@Skywalker It seems there's something incompatible with MySQL 8.0 in this API class. I switched back to MySQL 5.7 at the moment.
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 25 Nov 2023, 04:28
by Chutriel
Hi,
same here. Have to stay on 5.7, I am using this class in a very big application, and I love it for its simplicity. Is there anyone, that had any success in using it with MySQL 8 ?
Re: [CLASS] MySQLAPI - MySQL wrapper
Posted: 26 Nov 2023, 09:52
by just me
Hi,
which errors do you get when you try to use MySQL v8?
Re: [CLASS] MySQLAPI - MySQL wrapper .. former libmysql.dll from 2017 stopped working with Win10 22H2 64-bit
Posted: 14 Mar 2024, 11:19
by Jovannb
Hi,
I learned to know, that until this month, the
32-bit libmysql.dll from 2017 worked problem-free with Win10 22H2 64 bit together with AHK1.1.xx A32 on more than 15 computers.
But beginning with this month, with a new computer (Dell 9440) and Win10 22H2 64-bit, driver wont work, I got a message, that the library (
libmysql.dll) cant be found, despite it was there and accessible for my .ahk-scripts.
After a longer investigation period, with procmon (sysinternals, russinovich) and not getting any satisfying result, we (a fellow and me) found, that there is a newer
32-bit libmysql.dll from
2022 - you can find it in 32-bit release of
www.heidisql.com.
With that newer libmysql.dll everything works smoothly as previously with all my clients which use AHK 1.1.xx A32.
Hopefully somebody else can use that information which costs me more than 10 hours.
JB.