Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1447

max_allowed_packed (1 reply)

$
0
0
I often use parameters in mysql commands (in .net programming) in this way:

myMysqlCommand.Parameters.Add("?code1", MySqlClient.MySqlDbType.VarChar).Value = code1;
myMysqlCommand.Parameters.Add("?descr1", MySqlClient.MySqlDbType.VarChar).Value = descr1;
myMysqlCommand.Parameters.Add("?code2", MySqlClient.MySqlDbType.VarChar).Value = code2;
myMysqlCommand.Parameters.Add("?descr2", MySqlClient.MySqlDbType.VarChar).Value = descr2;
myMysqlCommand.CommandText = "Insert Into Table (code, desc) Values (?code1, ?descr1), (?code2, ?descr2)";
myMysqlCommand.ExecuteNonQuery();

The max_allowed_packet variabile, refers to the CommandText length? Or it refers to the entire content (CommandText and all parameter names and contents)? Or the command is parsed before the send and the variabiles are replaced by its content, (then it refers to the length of the string: Insert Into Table (code, desc) Values ('', ''), ('', '') and the length of variables?

Thank you

Viewing all articles
Browse latest Browse all 1447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>