Discussion of article "How to Access the MySQL Database from MQL5 (MQL4)" - page 30

 
andreysneg #:

Insert and Update query - only 16kb query limit ?


If the query is more than 16.000 characters, metatrader crashes (closes). if less, it is fine.

I attach an example of UPDATE for 32.000 characters.


Field for updating in the database - LONGTEXT

The library defines the size for queries in 64kb:

#define MAX_QUERY_SIZE 65535 // Max size of SQL query

I suppose in your case (and probably not only in your case, but in MQL string) there is 4-byte utf encoding, that is 16*4 = 64 and the limit is reached....

Here either split queries or increase the buffer for the query and recompile.

 

Awesome!

Its "too loud" use SELECTs with this wrapper in OnTick() function?

Thanks.