SQLite in MQL5: new features and performance testing - page 5

 
Roman:

The inclusion of the databasefile as a resource, most likely, is intended only for unpacking the file on disk, from ex5.
Further work with the database, happens directly to the file.

The database file can be saved in a resource, but only in RAM. It is impossible to normally save THIS resource to disk through ResourceSave. It distorts non-color data.

To include a file as a resource in the EA, it must already be as a resource on disk. But, for now, it cannot normally be saved as a resource. This is what I mean.
 
It is one thing to save the data in the resource, and another thing to save the resource itself.

You can save everything in the resource, but everything is lost when the computer is switched off. To keep it, you need to save the resource to disk.

Why save to a resource and not to a file? - So that you can integrate it into the EA.

You can integrate the resource into the Expert Advisor if the resource is saved on disk. There is no other way.

At present, only resources with an image can be saved on the disk. The rest of them are distorted. Therefore, not all of the data can be included to the Expert Advisor as a resource.
 

Added function examples - in order of complexity:

 
Rashid Umarov:

Added function examples - in order of complexity:

I wouldn't have guessed that the English documentation contains examples, unlike the Russian one.

 

Реter Konow:

Consequently, not all data can be included in the EA as a resource.

Resource variables


Документация по MQL5: Программы MQL5 / Ресурсы
Документация по MQL5: Программы MQL5 / Ресурсы
  • www.mql5.com
В данном примере показано как проигрывать звуки из файлов Ok.wav и timeoit.wav, входящих в стандартную поставку терминала. Эти файлы находятся в папке означает папку, из которой запущен клиентский терминал MetaTrader 5.  Программным путем из mql5-программы каталог терминала можно узнать следующим образом: Расположение каталога данных терминала...
 
Yury Kulikov:

Resource variables


Not everything can be saved correctly with ResourceSave(), and if everything is saved, not everything can be integrated correctly. More precisely, everything can be integrated, but not everything at once... ))))
 
Реter Konow:
Not everything can be saved correctly with ResourceSave(), and if everything is saved, not everything can be integrated correctly. More precisely, everything can be integrated, but not everything at once... ))))
Not all data can be integrated correctly into the EA if that data was saved via ResourceSave() and is not an image. That's what I meant to say.
 
Edgar Akhmadeev:

I wouldn't have guessed that the English documentation has examples, unlike the Russian one.

The Russian one didn't have one example, so I gave the English links.

 
Реter Konow:
Not all data can be integrated into the EA in the correct way if this data has been saved via ResourceSave() and is not an image. That's what I meant to say.

Why save data with ResourceSave when FileSave is available?

 
Yury Kulikov:

Why save data with ResourceSave when FileSave is available?

It's better to save a resource with ResourceSave, because by integrating it into the Expert Advisor, we immediately get its content into an array with ResourceReadImage. It's convenient and fast, but it's not universal. I haven't integrated binary files as resources, so I don't know how to make them readable again.
Reason: