Discussion of article "How to Access the MySQL Database from MQL5 (MQL4)" - page 18
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello, I read this document interestingly.
Could I ask you a question?
I wanna know how to confirm the connection with MySQL.
Please teach me how to confirm the connection.
About original japanese: And on Monday, when the market starts, an error is found in the project. Therefore, we strongly recommend that you confirm the connection and/or reconnect to the database at intervals smaller than the timeout specified in the server configuration.
That means: after then, you will find out an error in your project on Monday. So, I recommend you to confirm that the connection is alive or dead at a time interval shorter than the timeout server settings.
Thank you.
Hello,...
I wrote the code for the time being like below. 1.
Create a table that has a time record when confirm the connection. 2.
Create a table that has a time record when confirm the connection. 2.
If the UpSert will be failed, try resync with MySQL.
Please tell me if some methods exist to confirm the connection.
Please tell me if some methods exist to confirm the connection.
I would like to ask, I did not disconnect the database operation, but the database is just beginning to connect data normal data over time, can not directly read the database information, but there is no error message
I use MT4
Hi Alain,
Thanks a lot! I could figure it out what was wrong.
In my case the broker gives me the currency symbol with a £ sign. I've deleted it and it works.
Thanks again.
Thanks for your time reading this artice. I've also checked your (https://www.mql5.com/en/code/11114), I've found such solution a long time ago (before MT4 build 600) and I liked the idea to make MQL and MySQL friendly. But just one thing I don't want to use is arrays to retreive the data from database. That's why I've built this solution for using with MT4 and MT5.
Also, I forgot to add x64-based project to the article, so you can download it right here, in discussion. Nothing was changed in sources, just DLL has been recompiled for x64.
Good luck,
Eugene
hi Eugeniy Lugovoy , thanks for your article, I used x32-based project in my (64bit windows with mql5) and I had this error :
2018.06.04 17:58:52.879 MySQL-001 (XAUUSD,H1) Cannot load '..\libraries\MQLMySQL.dll' [126]
and now Im trying to use your x64-based project that you uploaded that in this forum but i still have above error .
I tried to run one of scripts in 2 ways ,
first I put dll files in this address : ...\MQL5\Libraries
second I put them in this address : C:\Windows\SysWOW64
but neither of them worked .
Hi Eugeniy Lugovoy
I'm getting the following error not sure what is up!
The errors occurs on the MQLMySQL.mqh file
'StrToInteger' - function not defined MQLMySQL.mqh 224 10
'StrToDouble' - function not defined MQLMySQL.mqh 229 10
on the following lines of code:
int MySqlGetFieldAsInt(int pCursorID, int pField)
{
return (StrToInteger(MySqlGetRowField(pCursorID, pField)));
}
double MySqlGetFieldAsDouble(int pCursorID, int pField)
{
return (StrToDouble(MySqlGetRowField(pCursorID, pField)));
}
Kind Regards,
New article How to Access the MySQL Database from MQL5 (MQL4) has been published:
Author: Eugeniy Lugovoy
Hi Eugeniy Lugovoy,
Firstly, thank you for taking the time to make this project.
I've been looking for weeks on how to import/update all the open/closed trades from a trading account into a MySQL table, if possible realtime. is there a way to do this using your library?
Many thanks in advance.
Dragos
win2008 Or win10 X64
run Log
2018.09.15 20:10:26.742 MySQL-001 (EURUSD,H1) Cannot load 'C:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\ 67381DD86A2959850232C0BA725E5966\MQL5\libraries\MQLMySQL.dll' [193]
2018.09.15 20:10:26.742 MySQL-001 (EURUSD,H1) Cannot call 'ReadIni', '... \libraries\MQLMySQL.dll' is not loaded
2018.09.15 20:10:26.742 MySQL-001 (EURUSD,H1) unresolved import function call
SomeBody Help
For x64 platforms, use the following libraries (with discussion)
win2018R2 Or win10 X86
????