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

 
Реter Konow:
It's better to save a resource with ResourceSave, because when you integrate it into EA, you get its content into an array using 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.

Save the data, integrate it through resource variables. Then you can save any data, not just BMPs. What could be simpler?

 
Yury Kulikov:

Save binary data, integrate it through resource variables. Then you can save any data, not just BMPs. What could be easier?

Well, it might be simple, but I haven't had any experience of it. I'll have to check it out.
 
Yury Kulikov:

Save the data, integrate it through resource variables. Then you can save any data, not just BMPs. What could be simpler?

Do you do the same with Database? The FileSave function does not support strings. Only with crutches (convert strings to char array).
 
Реter Konow:
Do you do the same with Database? The FileSave function does not support strings. Unless you use crutches (convert string to char array).

FileSave is just an example :) think bigger and study file operations in mql ...

 

Has anyone encountered error 5621 (Library misuse error) when trying to create a database in DATABASE_OPEN_MEMORY mode?

The error occurs as they say in the empty place, i.e. usual construction does not work and gives out dbHandle=-1:

int dbHandle = DatabaseOpen("Btr",DATABASE_OPEN_MEMORY);

How to deal with it?

 
Try using the predefined database name":memory:" to work with databases in memory.
 
Sergey Lebedev:

Has anyone encountered error 5621 (Library misuse error) when trying to create a database in DATABASE_OPEN_MEMORY mode?

The error occurs as they say in the empty place, i.e. usual construction does not work and gives out dbHandle=-1:

int dbHandle = DatabaseOpen("Btr",DATABASE_OPEN_MEMORY);

How to deal with it?

Add the DATABASE_OPEN_READWRITE flag

 

SQL functions in MQL5 are great!

But it would be interesting to use the built-in language to access external databases, MS SQL , ORACLE, SyBase, MySQL, etc. Without using a DLL.

 

Thanks for the clarification, now opening the database in DATABASE_OPEN_MEMORY mode works!

 
Yuriy Zaytsev:

SQL functions in MQL5 are great!

But it would be interesting to use the built-in language to access external databases, MS SQL , ORACLE, SyBase, MySQL , etc.Without using a DLL.

Then go to: Working with network functions, or MySQL without DLLs

Работа с сетевыми функциями, или MySQL без DLL: Часть I - коннектор
Работа с сетевыми функциями, или MySQL без DLL: Часть I - коннектор
  • www.mql5.com
Примерно год назад список сетевых функций в MQL5 пополнился функциями для работы с сокетами. Это открыло широкие возможности для программистов, которые разрабатывают продукты для Маркета, поскольку теперь можно реализовать то, чего раньше нельзя было сделать без динамических библиотек. Один из таких примеров мы рассмотрим в данном цикле из двух...