Libraries: AdoSuite v 1.0 - page 2

 

Great library - thank you very much to the author!

I have a question like this. I create a database in MS Access 2010 with extensions *.mdb and *.accdb. Then I try to read data from it, but exceptions like this pop up:

COleDbConnection::Open method threw an exception of OleDbException type:

Unrecognised database format: 'C:\Program Files (x86)\MetaTrader\MQL5\Files\Database1.mdb'.


The COleDbConnection::Open method threw an exception of type OleDbException:

Unrecognised database format: 'C:\Program Files (x86)\MetaTrader\MQL5\Files\Database1.accdb'.

But when I insert the required table into the database file that the author attached as an example(adotest.mdb), everything is read normally.

How to solve it?

 
denkir:

Great library - thank you very much to the author!

I have a question like this. I create a database in MS Access 2010 with extensions *.mdb and *.accdb. Then I try to read data from it, but exceptions like this pop up:

COleDbConnection::Open method threw an exception of OleDbException type:

Unrecognised database format: 'C:\Program Files (x86)\MetaTrader\MQL5\Files\Database1.mdb'.


The COleDbConnection::Open method threw an exception of type OleDbException:

Unrecognised database format: 'C:\Program Files (x86)\MetaTrader\MQL5\Files\Database1.accdb'.

But when I insert the required table into the database file that the author attached as an example(adotest.mdb), everything is read normally.

How to solve it?




Well, for starters, please upload here the script and the database, I will look at leisure.
 
mrProF:
Well, for starters, drop here the script and the base, I'll take a look at my leisure.

Please!

My script testAdo.mq5 is written on the basis of your Sample Query.mq5. And in the database there is only one column with data.


Files:
testAdo.zip  40 kb
 
denkir:

Please!

My script testAdo.mq5 is written on the basis of your Sample Query.mq5. And there is only one column with data in the database.


This is not my script:)

Try replacing the connection string with:

conn.ConnectionString("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=MQL5\Files\Database1.accdb;");

I have worked, but a lot of not deleted objects, I'm still sick and do not want to dig. :)

 
mrProF:
It's not my script:)

Try replacing the connection string with:

I got it working, but there are a lot of objects not deleted, I'm sick and don't feel like digging around. :)

mrProF, thanks for the hint. But it didn't work for me. But the problem is probably in the interface...

I wish you a speedy recovery ;-)

 
denkir:

mrProF, thanks for the tip. But it didn't work for me. But the problem is probably in the interface...

I wish you a speedy recovery ;-)

Thanks!
Do you get any errors?
 
mrProF:
Thanks!
Are you getting any errors?

All the same errors I pointed out.... But the source database adotest.mdb works fine. I put my spreadsheet in there, that's how I use it :-)

I have MS Office 2010.

 
That's it, problem solved. The thing is that I have Vista x64 and MS Office x64. I just had to install database engine x32 for interface compatibility.
 

Hello!

Is there a similar library for MT4 ?

On mql4.com I have searched everything, I didn't understand anything and links are broken, for example: ADOLib.dll.

If anyone has a similar library for MT4, please post it or give a link !


P.S. Or at least post the file ADOLib.dll

 
GarF1eld, could you give an example of filling a database via AdoTable? Here you have example 7 "Filling an AdoTable" by reading data from a table. How to do the reverse through the adapter? Thank you.