The article is very useful and I will refer to it many times to create my own databases.
It's a bit early for it, but in general you can already feel the power of the fifth version.
Alexander, please help me in this situation...
I need, for example, to save some array into a database. I wrote a script.
It looks like this:
#property copyright "Copyright 2010, MetaQuotes Software Corp." #property link "http://www.mql5.com" #property version "1.00" #include <Object.mqh> #include <Arrays\List.mqh> // connect OleDb components #include <Ado\Providers\OleDb.mqh> #include <Ado\Data.mqh> double PriceBuffer[]; //+------------------------------------------------------------------+ //| Script programme start function| //+------------------------------------------------------------------+ void OnStart() { long n1=100; MqlRates rates[]; ArraySetAsSeries(rates,true); double nClose[]; ArrayResize(nClose,n1); ArrayResize(t,n1); CSymbolInfo m_smbinf; m_smbinf.Name(Symbol()); int dg=m_smbinf.Digits(); int copied=CopyRates(Symbol(),0,0,n1,rates); for(int i=0;i<n1;i++) nClose[i]=rates[i].close; // form the table to be passed to SaveDataToDb CAdoTable *table=new CAdoTable(); table.Columns().AddColumn("Price",ADOTYPE_DOUBLE); ArrayResize(PriceBuffer,n1); // fill the dable with data from buffers for(int i=1; i<n1; i++) { CAdoRecord *row=table.CreateRecord(); row.Values().GetValue(0).SetValue(PriceBuffer[i]); table.Records().Add(row); } }
But at compilation the following error occurs: "'Values' - cannot call protected member function".
The error is related to the line:
row.Values().GetValue(0).SetValue(PriceBuffer[i]);
Although in the function CBsvEngine::SaveData(void)
such lines worked normally:
// fill the dable with data from buffers for(int i=1; i<TicksInBuffer; i++) { CAdoRecord *row=table.CreateRecord(); row.Values().GetValue(0).SetValue(TickBuffer[i].time); row.Values().GetValue(1).SetValue(TickBuffer[i].bid); row.Values().GetValue(2).SetValue(VolumeBuffer[i]); table.Records().Add(row); }
Great article! Really just the solution I was looking for. Unfortunately I'm having the same issue as Denkir commented on in the Russian version of this article.
It does not compile giving error:
'Values' - cannot call protected member function.
Associated with these lines in CBsvEngine::SaveData(void)
I would really love to get this working. Much appreciated!
It does not compile giving error:
'Values' - cannot call protected member function.
Associated with these lines in CBsvEngine::SaveData(void)
row.Values().GetValue(0).SetValue(TickBuffer[i].time); row.Values().GetValue(1).SetValue(TickBuffer[i].bid); row.Values().GetValue(2).SetValue(VolumeBuffer[i]);And also the same error associated with numerous calls to 'Values()' in CDbDataAdapter::Fill(CAdoTable *table) in the file DbDataAdapter.mqh
I would really love to get this working. Much appreciated!
can it be run in strategy tester? when i use adoSuite in strategy tester, it always terminate the program.
Automated-Trading:
Unfortunately the build 586 has an error in calling of 32-bit DLLs functions. It will be fixed in next build.
Unfortunately this haven't been solved after the last update. Any solutions or recommendations? how long this could take? I was told to wait until the next build and it came without solving the problem.
Unfortunately the build 586 has an error in calling of 32-bit DLLs functions. It will be fixed in next build.

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
New article Practical Application Of Databases For Markets Analysis is published:
Working with data has become the main task for modern software - both for standalone and network applications. To solve this problem a specialized software were created. These are Database Management Systems (DBMS), that can structure, systematize and organize data for their computer storage and processing. As for trading, the most of analysts don't use databases in their work. But there are tasks, where such a solution would have to be handy. This article provides an example of indicators, that can save and load data from databases both with client-server and file-server architectures.
Author: Alexander