Attach MySQL to MQ4 - page 6

 
Graff:

I believe that just describing libmysql.dll functions is not enough. The class must allow the user to work with the database simply and effortlessly.
Example 1: connect to the database.
Example 2: getting multi-line and multi-column results. All the user needs to do is feed a query and an array(structure) to write the result.
There can also be many examples of adding information to the database.
If you just use a set of functions with no checks, it's very easy to get an Access violation read to 0x00000000 in 'libmysql.dll' and crash the whole system.

quite agree with this, a set of functions can be made to bring complex actions into one typical function.

I'm willing to consider creating an open class to work with muscle together.

I wouldn't mind, but I don't have any experience with pairwise coding.
 

At the beginning of last year I wrote a class to work with the sqlite3 database, posted on google code. Then someone found it and suggested significant changes, after which version 2 came out.

I wrote my class over a year ago. It's not written perfectly, but it worked.

Now it needs to be completely rewritten.

I suggest creating a new project on google code and then everyone can contribute their suggestions, code. There you can also create a description on WIKI and examples.

 
OK, as long as the project does not die with honour as a neuro project :)
 
sergeev:

ok, as long as the project does not die bravely as a neuro project :)

I'm rewriting my class now, I'll let you know as soon as it's ready.

Found another method https://www.mql5.com/en/forum/5747 to retrieve strings

 
Graff:

I'm rewriting my class now, I'll let you know as soon as it's ready.

Found another method https://www.mql5.com/en/forum/5747 to retrieve strings


It's a bit messy.

Especially since it's only solved for one field.

We have it for the whole string and all data types. including binary ones.

 

Greetings.

Maybe anyone has encountered such a problem.

Had an advisor, was writing optimisation results to database, connected to local base, uses libmysql.dll library.

I have reinstalled my Windows, I used XP 32 and now I have XP 64 and I am using the same EA in the same terminal (I have not even reinstalled the terminal) and my EA is not working with the database, he writes:

dll calls are not allowed; 'libmysql.dll'-'mysql_init'

What could be the problem, can anyone know?


 
dj_ermoloff:

dll calls are not allowed; 'libmysql.dll'-'mysql_init'

What could be the problem, who knows?


Allow dll calls to the EA
 
 
vedroid:
Found a solution https://www.mql5.com/ru/code/10645

for the particularly lazy.
 

Mysql question - every time an EA is called, it opens a new connection.

Can I tell it to use an existing connection if it's already set up?