Discussing the article: "Market Simulation: Getting Started with SQL in MQL5 (V)"

 

Check out the new article: Market Simulation: Getting Started with SQL in MQL5 (V).

In the previous article, I showed how to proceed in order to add a query mechanism. This was needed so that, inside MQL5 code, you could fully use SQL and retrieve results when executing a SQL SELECT ... FROM query. But there is still one last function we need to implement. This is the DatabaseReadBind function. Since understanding it properly requires a slightly more detailed explanation, it was decided to cover it not in the previous article, but in today's article. So, since the topic will be fairly extensive, let us proceed directly to the next section.

In the previous article Market Simulation: Getting Started with SQL in MQL5 (IV) we explained a small precaution that should be observed when using SQLite in MetaTrader 5. Although this behavior may change in the future, as a precaution you should always test things first before using SQLite inside MetaTrader 5. In any case, there we showed how to proceed in order to add a query mechanism, so that in MQL5 code we could make full use of SQL and retrieve results by executing SQL SELECT ... FROM queries.

But we forgot to mention the last function we need to implement. This is the DatabaseReadBind function. Since understanding it properly requires a slightly more detailed explanation, it was decided to cover it not in the previous article, but in today's article. So, since this topic will be fairly extensive, let us proceed directly to the next section.


Author: Daniel Jose