Discussion of article "How to Access the MySQL Database from MQL5 (MQL4)" - page 6
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
Excellent!
Using MQL5 to generate data for MQL4.
Everything worked beautifully except that I had to remove the single quotes around tablename on the query command
Query = "SELECT Symbol,Composite,Pattern FROM summarytable";
works ok
Yes, it's possible to use without quotation if you do not plan to name tables with upper/lower case (mysql is case sensitive) and special symbols. BTW, it's not single quote symbol "'", but it's "`"
So you query also could be: Query = "SELECT `Symbol`,`Composite`,`Pattern` FROM `summarytable`";
if you want to name columns Symbol, but not symbol or SYMBOL
Hi Eugeniy,
Thank for your module, very helpful. Could you help to add function to get Field Name? or how I could add it in VC++?
Yes, this is known problem, because basically ASCII encoding was used. Now I'm working on UTF encoding support to fix this problem.
This is working for me very well..
Can anyone help me insert data by calling a stored procedure?
What are the correct methods.. Other SQLConnection usages define parameters as such:
command.Parameters.Add("@ID", SqlDbType.Int);
command.Parameters["@ID"].Value = customerID;
Thanks in advance.
Tom
This is working for me very well..
Can anyone help me insert data by calling a stored procedure?
What are the correct methods.. Other SQLConnection usages define parameters as such:
command.Parameters.Add("@ID", SqlDbType.Int);
command.Parameters["@ID"].Value = customerID;
Thanks in advance.
Tom
This can be done just using something like this: MySqlExecute(DB, "call YourProc("+(string)customerID+")")
Binding variables is not supported
The MySQL server is very busy, EAs selects and inserts couple of thousands of records each day (mostly prices and orders data) - I have not restarted trading terminals or the MySQL server for more than 2 weeks - no noticeable performance degradation or memory leaks, they work suspiciously stable.
Keep the good job!
I have noticed that having query string longer than 32kB crashes the terminal.
Is it possible to increase the length of executed query string, in my project I have to build dynamic query string with lots of UNION ALL?
I am not sure how can I fix this: MySqlCursorOpen(DB,sql_query);
I have noticed that having query string longer than 32kB crashes the terminal.
Is it possible to increase the length of executed query string, in my project I have to build dynamic query string with lots of UNION ALL?
I am not sure how can I fix this: MySqlCursorOpen(DB,sql_query);
Hi, i wonder, can you help me with error libmysql.dll cannot loaded or something.
Why I get this message? although I already put the dll file to MQL4/Libraries/libmysql.dll.
What is the cause? because what i can see is the file is imported, and nothing else but it cannot loaded, even i already checked the checkbox. Can you help me with this problem? Because I can't found it why it happened.
FYI: I'm using Windows 10 x64 and Metatrader4 from Exness.
Thank you.