Discussion of article "SQLite: Native handling of SQL databases in MQL5" - page 10

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Thanks, we'll check it out.
Likewise!
You should also check ON DELETE and ON UPDATE:
Without this, the work becomes very complicated.
Thanks for the reply!
For some reason I'm not getting the result I expect:
//---
Where is the error?
And this is something I'd like to deal with as well:
Our mistake was building without SQLITE_DEFAULT_FOREIGN_KEYS.
Already fixed and working - will be available in beta tonight. The table with FOREIGN KEYS will need to be recreated for the example above.
We will look at the commands in the panel later.
Our mistake was to build without SQLITE_DEFAULT_FOREIGN_KEYS.
It's already fixed and working - will be available in beta tonight. The table with FOREIGN KEYS will need to be recreated for the example above.
We will look at the commands in the panel later.
Thank you! I will definitely test it.
Hi,
Something doesn't seem right though.
I created a "signals.sqlite" database and got confirmation that it exists. I saved the data to the database and got confirmation that 63 records were saved. Unfortunately, I am unable to read anything from the database and when I check the database, I cannot find the "signals.sqlite" file. However, i find the directory in XM MT5/Bases/signals and in this directory the file "signals.dat", which is unreadable for me and has a size of 3845 kb.
The question is where can I find the "signals.sqlite" file and if not, how can I edit it?
I use XM MT5 build 3521
The file is usually stored in "<data folder>\MQL5\Files" unless you used the DATABASE_OPEN_COMMON flag.
The "signals.dat" has nothing to with SQLite.
The file is usually stored in "<data folder>\MQL5\Files" unless you used the DATABASE_OPEN_COMMON flag.
The "signals.dat" has nothing to with SQLite.
Hi, Fernando, thanks for answer
I expected it, because it is in the description, but unfortunately the files directory is empty and I created the database with this command:
filename="signals.sqlite"
int db=DatabaseOpen(filename, DATABASE_OPEN_READWRITE | DATABASE_OPEN_CREATE |DATABASE_OPEN_COMMON);
e.g. with DATABASE_OPEN_COMMON flag
DATABASE_OPEN_COMMON
The file is in the common folder of all terminals
how to interpret ii?@Zbigniew Mirowski #: I expected it, because it is in the description, but unfortunately the files directory is empty and I created the database with this command:
filename="signals.sqlite"
int db=DatabaseOpen(filename, DATABASE_OPEN_READWRITE | DATABASE_OPEN_CREATE |DATABASE_OPEN_COMMON);
e.g. with DATABASE_OPEN_COMMON flag
DATABASE_OPEN_COMMON
The file is in the common folder of all terminals
how to interpret ii?
Then you will find it in "%APPDATA%\MetaQuotes\Terminal\Common\Files".
Well, now I have a new problem. I came to the conclusion that maybe the error lies in the fact that I installed this MT5 on the C drive in Program files and maybe there are some access restrictions in the new Win11. So I installed a new instance on another disk, new demo account and tried to install this database there and... I got:
2022.11.30 10:37:26.036 CreateDB (EURUSD,H1) database error, table Signals already exists.
When creating a database, I immediately create tables. Create does not throw an error, because it is also opening the database, but creating a table throws an error.
I searched the whole computer and the "signals.sqlite" files were not found, but I found the "signals.dat" file again
Wow, I found the file "signals.sqlite"
C:\Users\name\AppData\Roaming\MetaQuotes\Terminal\Common\Files
there is only structure in the "signals.sqlite" file and I suspect there is data in the signals.dat file
C:\Users\name\AppData\Roaming\MetaQuotes\Terminal\Common\Files
But is that not exactly where I told you where you would find it?