I've rebuilt DLLs and MQL libraries (of MQLMySQL) to support unicode, now reviewing all sources and will share on GitHub very soon.
Also I'm testing now MQLAdoDB project to work with different databases (MS SQL, Oracle, PostgreSQL, MS Access, etc) from MQL using AdoDB & OLEDB.
This project also would be available soon on GitHub, and of course it would be free.
Codepage UTF-8 is supported now.
Happy New Year & good luck in development!
Hi Eugeniy, thank you so much for your contribution. It´s very usefull and really works!
Hi, wow thanks for all of this, there's a problem with my notifications so I've only just seen that you did this several months later.
Thanks very much, great work.
Lugovoy and thanks for your hard work!
In the current version of your implementation, is there a way to retrieve the "LAST_INSERT_ID" after an INSERT operation (in a table with an
Hi @Eugeniy Lugovoy
and thanks for your hard work!
In the current version of your implementation, is there a way to retrieve the "LAST_INSERT_ID" after an INSERT operation (in a table
with an AUTO_INCREMENT column)?
Hi arsenico42, you can try to make insert in one query and then select LAST_INSERT_ID in another one, but I cannot recommend this way, but I
cannot recommend this way because LAST_INSERT_ID is function which returning global database variable, and another one insert (from
another user, running concurrently) between your original insert and selection of LAST_INSERT_ID can affect LAST_INSERT_ID value.
This is not depended on library, it's how mysql/mariadb works.
But, I can advice you to create a function on database side to insert required values, select LAST_INSERT_ID and return this ID as function
value. it might looks like:
CREATE FUNCTION `import_funds_add`(
MODIFIES SQL DATA
declare id bigint;
INSERT INTO import_funds(`file_name`, `full_path`, `status`, `error`, `creation_date`)
VALUES (p_file_name, p_full_path, p_status, p_error, now());
SELECT LAST_INSERT_ID() INTO id;
And in MQL you have to open cursor for query:
qry="SELECT import_funds_add('bonuses.csv','c:\\broker imports\\XXX-FX','NEW','No errors') as last_id";
then get value as from usual cursor and close cursor.
So, instead of using those commands separately in MQL you can just combine them on DB side into function.
it's just an example from live system.
Awesome article and great libraries.
I'm trying to use your examples under MT5 but I'm getting this error:
2014.12.15 15:44:16.387 MySQL-001 'C:\Users\....\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\libraries\MQLMySQL.dll' is not 64-bit version
Are you running MT5 under 32-bit env?
Could you pleas help me with it?
Thanks very much!
Hello Carmine, you can download x64 version from sources on github.
Lugovoy, first of all
thanks for all the contribution to the community
I'm stucked here:
Lugovoy, first of all thanks for all the
contribution to the community
I'm stucked here: "Cannot load
Make sure you have MQLMySQL.dll & MQLMySQL.def files located in your folder
As you can see if you are running MQL programs in Tester mode, the path to libs would be different (because of UAC)
Please enable the necessary setting in your browser, otherwise you will not be able to log in.