Download MetaTrader 5
To add comments, please log in or register
Launch your trading signal and add account monitoring!
cicc1981
6
cicc1981 2014.05.15 16:04 

Hi!

I'd like to insert data directly from a MetaTrader 4 EA, and it hangs at first line: mysql = mysql_init(mysql);

Here's my code, where did I make a mistake?

Thanks!

#import "libmysql.dll"

int mysql_init(int db);

int mysql_errno(int TMYSQL);

int mysql_real_connect(int TMYSQL, string host, string user, string password,

string DB,int port,int socket,int clientflag);

int mysql_real_query(int TMSQL, string query, int length);

void mysql_close(int TMSQL);

#import

int mysql;

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

//| expert initialization function |

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

int init()

{

mysql = mysql_init(mysql); // <-- it hangs here

...
Alain Verleyen
Moderator
28671
Alain Verleyen 2014.05.16 08:31  

Welcome to mql4.com forum,

Please use the SRC button when you post code. Thank you.


This time, I edited it for you.

Alain Verleyen
Moderator
28671
Alain Verleyen 2014.05.16 08:32  
cicc1981:

Hi!

I'd like to insert data directly from a MetaTrader 4 EA, and it hangs at first line: mysql = mysql_init(mysql);

Here's my code, where did I make a mistake?

Thanks!


There are several topics about mysql on this site, please do some searches.
/
To add comments, please log in or register