文章 "SQL 与 MQL5: 与 SQLite 数据库集成" - 页 5

 

也许这对某些人有用。


在 MT4 中,代码几乎无需更改即可运行

我很久没有创建数据库文件了。也就是说,有结果,但没有文件。


解决办法:写入文件的完整路径,例如像这样:

  string path2 = TerminalInfoString(TERMINAL_DATA_PATH)+"\\MQL4\\Files\\DB.db3";
   
  if(sql3.Connect(path2)!=SQLITE_OK) return;
 

问题


很明显,这是编码的一个特点。

如果在数据库中写入俄语文本,在 SQLite studio 中看起来会歪曲(带问题的菱形)。

如果手动输入俄语文本,在 MT4 中看起来也是歪的。


问题:如何以正确的编码显示文本,以便俄语文本清晰可见?


 
MetaQuotes Software Corp.:

新文章SQL 和 MQL5:使用 SQLite 数据库

作者:o_O

嘿!

从第 2170 版开始,这个库出现了范围错误。能否请您更新一下,使其遵循新的 MQL5 范围 "指南"?谢谢!

顺便说一句,你做得很好!

 
这里有一篇实施本地 SQL 解决方案的新文章:https://www.mql5.com/zh/articles/7463
SQLite: Native handling of SQL databases in MQL5
SQLite: Native handling of SQL databases in MQL5
  • www.mql5.com
MQL5 is a perfect solution for algorithmic trading since it is as close to C++ as possible in terms of both syntax and computation speed. The MetaTrader 5 platform offers its users the modern specialized language for developing trading robots and custom indicators allowing them to go beyond simple trading tasks and create analytical systems of...
 
Quintos:

我想我发现了内存泄漏:

在 SQLite3Base.mqh 第 250 行中

应该是

接得好!
(有什么工具可以检查 这些东西吗?)
 
ByteImg.mqh运行出错,请修正