
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
I'm not much of a C++ expert. In the zip is the full tree of the "project" created in visual studio. In VS I just used the compile command to get the DLL. Please take from there...I'm afraid I can't give any pointers on other building methods or Make files.
Russell
Russell
many many thanks. I have now the db working.
OK thanks, I was confused by the project file extension - I'm using visual C++ 2008 express edition which uses .vcproj for it's project file extensions - but it can read the earlier version project file. Are you sure you posted your latest source file ? I found I had to add: row[i].len = strlen(row[i].string); after line #52 of mysql_wrapper.cpp (i.e. after row[i].string = lrow[i]; ) in order to get any data back from the database into my mq4 code.
Thanks for the feedback! The code posted worked for me. On review kind a strange it did. 8-) I adjusted the code as suggested.
Thanks! Small update as suggested attached
Russell
MT4_mysql_fetch_row crashes the terminal in vista
string lsQuery = "SELECT * FROM `symbols`";
MySQL_FetchArray(lsQuery, lsSymolData);
crush
err=mysql_errno(giMySQL); if(err>0){Print(AccountServer()+ " Ошибка в getsymbol() функция MySQL_FetchArray() err # "+err+" "+mysql_error(giMySQL) );return(err);}
for (int i = 0; i < ArrayRange(lsSymolData,0); i++){
for (int j = 0; j < ArrayRange(lsSymolData,1); j++){
// Print(i+","+j+": "+lsSymolData[i][j]);
}
}
table symbols:
id symbols
1 EURUSD
2 GBPUSD
3 GBPJPY
please fix it..
MySQL_FetchArray() crashes my terminal too.. I've no idea about why could it be, any ideas?
Edit: Solved it by taking the "lsResult" variable outside of the function and passing it as parameter. I pass newly created variable each time I need to fetch different number of fields (as terminal crashes on ArrayResize(lsResult, ..) if function was already called at least once and fetched another number of fields previously).