Attach MySQL to MQ4 - page 3

 
HIDDEN:

Full code implementation....

SQL dump of the database

Working result


No, querying a single field is a crutch.
You either need a normal solution or don't bother with it... to the dll

 
HIDDEN:

Is it not possible to retrieve an entire array at once with a single query?
 
sergeev:


No, querying a single field is a crutch.
You either need a normal solution or don't bother with it... Into the dll


So there's a DLL that allows you to read arrays and works consistently or not?

Are the complaints about the wrapper obsolete?

 
Eugene1:


So there is a DLL that allows you to read arrays and works steadily or not?

Are the complaints about the wrapper obsolete?


have you tried any of the suggested ones? or are you conducting a poll?
 
sergeev:

have you tried any of these suggestions or are you taking polls?


I would try it if any of the options were suitable for me.

I have a specific project. I want to improve my Expert Advisor a bit, but I can't go any further on arrays, I need to connect base, but it's the same as on arrays to extract one field at a time from base.

As for stability, my Expert Advisor is already unstable. If we add one more instability, I will not know why the trader has fallen.

And crashing, by the way, is quite unpleasant, introducing disturbances to the file system on the system disk.

Regularly, the file system has to be repaired, which, you will agree, cannot last long - the system will crash.

That's why I'm forced to start exactly with a survey now. I'm being cautious.

Now it's important for me to find a reliable solution (if it exists, of course), but I need to read an array of about 10,000 doublets at a time. One at a time - no way.

Can you give me some pointers on the subject?

 
You've already been told a lot. All you have to do is make a decision and work.
 
stringo:


MQL5 has functions for Unicode conversion. See /en/docs/convert/chararraytostring and /en/docs/convert/stringtochararray

Declare uchar arrays instead of strings in function import


How is string mysql_fetch_row(int result); called from dll supposed to return uchar array? Without rewriting the dll or writing a wrapper?
 

export


avatar
1
R_ME 07.08.2011 18:47

I have an idea to write something like API for MT4, for example to write EAs in C++.

But, when I started to write dll, I found out that since EA is executed once per tick, it is terribly long to translate data into my program via EAs.

Question, is there a possibility to send data from MT(EA) for example to MySQL database?

I like EAs in terms of placing orders but it is horrible, for example, to implement functions like iHigh in such a way (

 
Graff:

How can string mysql_fetch_row(int result); function, which is called from dll, return uchar array? Without rewriting the dll or writing a wrapper?

I'm going to bring up our topic.

Anyway, I experimented with memcpy and strcpy yesterday. Everything works. That is, now even if a function vvprays a pointer, it's no longer a problem. You can work with them.

 
sergeev:

I'm going to bring up our topic.

Anyway, I experimented with memcpy and strcpy yesterday. Everything works. That is, now even if a function vvprays a pointer, it's no longer a problem. You can work with them.

Post an example of your findings, as the code itself and how it works.