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

 
Fernando Carreiro #:

But is that not exactly where I told you where you would find it?

Then you will find it in "%APPDATA%\MetaQuotes\Terminal\Common\Files".

You were right, but I didn't find him there yesterday, there is only structure in the "signals.sqlite" file and I suspect there is data in the signals.dat file

but it's in the documentation
parameters

filename

[in] File name relative to the "MQL5\Files" folder.

 
Zbigniew Mirowski #:
You were right, but I didn't find him there yesterday, there is only structure in the "signals.sqlite" file and I suspect there is data in the signals.dat file

No! I have already told you that the "signals.dat" is an internal MetaTrader data file and it has nothing to do with SQLite.

The "signals.dat" file is where MetaTrader stores the information about signals that can be retrieved with the Trade Signals functionality ...

Code Base

Listing all MT5 Signals' properties to a CSV file

Fernando Carreiro, 2022.04.21 15:14

This simple quick & dirty script code will output a CSV file of all the Signals' properties as reported by the MQL5 Trade Signals functionality.

Documentation on MQL5: Trade Signals
Documentation on MQL5: Trade Signals
  • www.mql5.com
Trade Signals - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Zbigniew Mirowski #: but it's in the documentation. parameters, filename, [in] File name relative to the "MQL5\Files" folder.

But you used the flag "DATABASE_OPEN_COMMON" which changes the location. So don't use that flag if you don't want it in the common folder.

DATABASE_OPEN_COMMON

The file is in the common folder of all terminals

 
Fernando Carreiro #:

But you used the flag "DATABASE_OPEN_COMMON" which changes the location. So don't use that flag if you don't want it in the common folder.

DATABASE_OPEN_COMMON

The file is in the common folder of all terminals

ok, i understand and find data in signals.sqlite-wal:))

Thank You for your help)

 
Zbigniew Mirowski #: ok, i understand Then where is the data? I upload and receive confirmation signals.sqlite opened

CS 0 12:43:16.106 SignalsBasa (EURUSD,H1) DB: succesfull
The document after loading the data is still 8 kb and I cannot load the data and receive
2022.11.30 12:55:49.103 CreateDB (EURUSD,H1) DB: signals.sqlite opened
2022.11.30 12:55:49.103 CreateDB (EURUSD,H1) 0: 0,0,0.0,0.0

But you have already stated that you found the file ...

"Wow, I found the file "signals.sqlite" C:\Users\name\AppData\Roaming\MetaQuotes\Terminal\Common\Files"

So what is the problem?

The "signals.sqlite" file will have structure and data all in one. Open it via MetaEditor and see the data for yourself — Working with SQL data bases - MetaEditor Help

 
Zbigniew Mirowski #: ok, i understand and find data in signals.sqlite-wal:)) Thank You for your help)

You are welcome!

 

In MetaEditor, the maximum number of columns of database tables to show is only 23.

Is it possible to remove the limitation?

 
Anatoli Kazharski #:

In MetaEditor, the maximum number of database table columns to show is only 23.

Is it possible to remove the limitation?

Fixed in beta 3531 with increasing columns to 64.
 
At some point somewhere there was an answer about single and double quotes. Not verbatim, but close to the text - "has been working for a long time with double quotes". At the moment, coming back to working with tables, an attempt to write text in double quotes into a table fails. However, by enclosing the text in single and then double quotes, the write completes successfully. What is the sound rule of single and double quotes for writing text to a table?
Options and outcomes :
successful -
         AddTable_TstDate(i,
                          iTime(Symbol(),PERIOD_CURRENT,i),
                          iHigh(Symbol(),PERIOD_CURRENT,i),
                          iTime(Symbol(),PERIOD_CURRENT,i),
                          iLow(Symbol(),PERIOD_CURRENT,i),
                          IntegerToString(iTime(Symbol(),PERIOD_CURRENT,i)),
                          1121,
                          "'string_no_error'");

not successful -

         AddTable_TstDate(i,
                          iTime(Symbol(),PERIOD_CURRENT,i),
                          iHigh(Symbol(),PERIOD_CURRENT,i),
                          iTime(Symbol(),PERIOD_CURRENT,i),
                          iLow(Symbol(),PERIOD_CURRENT,i),
                          IntegerToString(iTime(Symbol(),PERIOD_CURRENT,i)),
                          1121,
                          "string_error");

I would like to point out, translating an integer to a string does not produce an error when writing to a table.

 

Dear developers, please tell me why it is not possible to attach an existing database from a file (ATTACH DATABASE)?

Then how is it possible to attach a base from the RAM...?

I have attached the code.

The create_databases.mq5 script creates a database. The attach_mem_db.mq5 script attaches the database from the RAM. But the attach_other_db.mq5 script fails to attach an existing database.