Libraries: AdoSuite v 1.0 - page 3

 

Hi Alexander,

thanks for making these libraries available. Somehow, I have tried to install them and get some of your samples working but I hit the same issue over and over again. When I try to run one of the scripts, I get the error message:

 

2011.03.11 09:06:22 1 Inserting a record (GBPUSD,H1) Cannot open 'C:\Program Files\MetaTrader 5\MQL5\Libraries\AdoSuite.dll' (14001)

 

The AdoSuite.dll is in the correct directory, .NET 2.0 framework is installed, I have followed all of your instructions, but yet I always hit this error, even with the simplest script where I only do an include of your library.


Any idea where this may come from? (by the way the issue is not because ADOSuite.dll is not in the directory: if i remove the dll from the directory then the error is a different one: "Cannot open AdoSuite.dll'(126)")

 

Neil.

PS: even a script as simple as the one below fails with the same 14001 error. Could it be that your DLL needs to 'see' other DLLs?

//+------------------------------------------------------------------+

//|                                                      TestADO.mq5 |

//|                        Copyright 2011, MetaQuotes Software Corp. |

//|                                              http://www.mql5.com |

//+------------------------------------------------------------------+

#property copyright "Copyright 2011, MetaQuotes Software Corp."

#property link      "http://www.mql5.com"

#property version   "1.00"

//+------------------------------------------------------------------+

//| Script program start function                                    |

//+------------------------------------------------------------------+

#include <Ado\Providers\OleDb.mqh>

void OnStart()

  {

   Comment("Test");

  }

//+------------------------------------------------------------------+

 

Hello,

You are likely dealing with an issue related to your terminal's data directory. There are 3 locations MT5 uses:

  • TERMINAL_PATH
  • TERMINAL_DATA_PATH
  • TERMINAL_COMMONDATA _PATH

 

Hi Alexander,

i copied all files right, but get the error:


'CAdoRecord::Values' - cannot call protected member function    DbDataAdapter.mqh    108    23

when i include one of this includes:

#include <Ado\Providers\OleDb.mqh>
#include <Ado\Providers\Odbc.mqh>
#include <Indicators\BsvSqlServer.mqh>

If i make 'CAdoRecord::Values public, I get the initialisation failed running my EA script.

Can you help?

Thanks


Ok, i solved it. Copmilation mith 64bot and it starts without errors.

 
How can I use this library to force NULL to be inserted into a table field by INSERT with parameters? No matter how hard I try, it tries to insert 0 to me.
 

Can you tell me what the problem may be?

When compiling it generates a warning:

differed by const qualifier, function CAdoRecord::Compare overrides CObject::Compare AdoRecord.mqh 61 54

and the error:

'=' - cannot convert from const pointer to non-const pointer AdoRecord.mqh 80 19

 
SergeyVS:

Can you tell me what the problem may be?

When compiling it generates a warning:

differed by const qualifier, function CAdoRecord::Compare overrides CObject::Compare AdoRecord.mqh 61 54

and the error:

'=' - cannot convert from const pointer to non-const pointer AdoRecord.mqh 80 19

in lines 62 and 82 of the AdoRecord.mqh file, you should remove "const" from the declaration and implementation of the CAdoRecord::Compare method.

62: virtual int Compare(const  CObject* node, int mode = 0);

82: int CAdoRecord::Compare(const CObject* node, int mode = 0)
The codes have been updated.
 

Could you please tell me how to solve the following problem: AdoSuite.dll' is not 64-bit version. And does not want to work....

Thanks in advance!

 
Alex_L:

Could you please tell me how to solve the following problem: AdoSuite.dll' is not 64-bit version. And does not want to work....

Thanks in advance!

Recompile the project for 64-bit platform. But there are other problems, when launching any example it writes: invalid EX5 file (8)

 
Is the author of the project still alive? Is there a working version for x64?
 

Just in case it may be useful to someone, I will post the link here:

MT4-ODBC Bridge

https://github.com/onagano/mt4-odbc-bridge

This is a library for the popular trading terminal, MetaTrader4 (MT4), to give access to a relational database through ODBC interface. The main features are as follows.

  • Recording price data
  • Synchronizing trade status
  • Executing orders

MT4 has its own programming language, MQL4, for algorithmic trading. Though it is easy to learn, its expressiveness is very limited. People who want to execute more sophisticated algorithm tend to resort to outside of MT4, typically using DLLs. But the native programming of DLLs is restricted to the Windows platform, which is not familiar to mainstream programmers of the recent open source movement.

MT4-ODBC Bridge (MOB in short) provides a buffer area onto a RDBMS like MySQL, PostgreSQL, SQLite, etc. Such a database is general enough for the most open source movement. Such database is general enough for the most open source programmers. You can access to the database by your familiar language, or maybe directly by SQL.

This is a homemade bridge via DLL between MT4 terminal and ODBC driver of any database. And the database can even be in-memory like H2, which allows you to exchange data between EA and indicator, collect ticks, other data, or control EA or indicator. And everything else.