Discussion of article "How to Access the MySQL Database from MQL5 (MQL4)" - page 15

 
Hello I have a question (Please forgive me because I am Japanese because it is a bad sentence for English translation) Selecting multi-byte characters in Does this program support multibyte characters?
 
Hello

I have a question.
(* I am translating texts using translation software because I am a Japanese person, so I think it is strange English but please forgive me)

Looking at the article here I am coding Mysql's connection.
You can extract 1 Byte characters with SELECT, but multibyte characters garbled. I changed the character code setting of Mysql side and script side, but it can not be garbled. What is the cause?

Best, Regards.
 
Freemans Core:
Yes, this is known problem, because basically ASCII encoding was used. Now I'm working on UTF encoding support to fix this problem.
 
Eugeniy Lugovoy:
Yes, this is known problem, because basically ASCII encoding was used. Now I'm working on UTF encoding support to fix this problem.

Thank you for your reply. Again, multibyte non-compliant (ASCII) was specification. I would like to think of another way Thank you. Best regards.
 

This is working for me very well..

Can anyone help me insert data by calling a stored procedure?

What are the correct methods.. Other SQLConnection usages define parameters as such:

command.Parameters.Add("@ID", SqlDbType.Int); 
command.Parameters["@ID"].Value = customerID;

 Thanks in advance.

 

Tom 

 
tommylux:

This is working for me very well..

Can anyone help me insert data by calling a stored procedure?

What are the correct methods.. Other SQLConnection usages define parameters as such:

command.Parameters.Add("@ID", SqlDbType.Int); 
command.Parameters["@ID"].Value = customerID;

 Thanks in advance.

 

Tom 

This can be done just using something like this: MySqlExecute(DB, "call YourProc("+(string)customerID+")")

Binding variables is not supported 

 
Eugeniy Lugovoy:
For x64 platform, use the following library (with discussion)
Your programme link under Mysql in the operating system Windows Server 2008 64bit R2 SP1 , DB values are not stable, often is equal to -1, how to solve, please, Sir? Sir? please tell me, Urgent need ! Paid services , contact me email:2393607300@qq.com (I use MQL4 EA )
 
Eugeniy Lugovoy:

Ok, I see you have written an expert advisor for this purposes, and it is written without recommendations I've posted in article.

So, let's move step by step: 1.

1. The calling of " DB = cMySqlConnect(Host, User, Password, Database, Port, Socket, ClientFlag); " should be made inside OnInit() standard function instead of OnTick(). 2.

2. You are uses cMySqlConnect - it's imported function form DLL, you have to use MySqlConnect function instead of cMySqlConnect function !

3. You have to call MySqlDisconnect function inside OnDeinit() stundard function.

4. You have to check database connection identifier inside OnTick() standard function to be sure that connect was successful.

Finally it will looks like.

DB values are not stable, often is equal to -1

According to this method has been solved , thank you very much!

 
C_1982:
Your programme link under Mysql in the operating system Windows Server 2008 64bit R2 SP1 , DB values are not stable, often is equal to -1, how to solve, please, please tell me, Urgent need ! Sir? please tell me, Urgent need ! Paid services , contact me email:2393607300@qq.com (I use MQL4 EA )

MySQL database server disconnects automatically when no queries was sent during specified timeout (on server side), this is why you need to check connection with db and reconnect if needed.

 

It's very good!

Please support Chinese.

E-MAIL: 547970398@qq.com