3
MySqlCommand comm = new MySqlCommand("", conexao);
comm.CommandText = ("SELECT @select FROM @from WHERE @where LIKE '@like'");
comm.Parameters.AddWithValue("@select", select);
comm.Parameters.AddWithValue("@from", from);
comm.Parameters.AddWithValue("@where", where);
comm.Parameters.AddWithValue("@like", like);
If executed Debug.WriteLine(comm.CommandText)
my return is:
"SELECT @select FROM @from WHERE @where LIKE '@like'"
.
How to view the CommandText
from MYSQL connector to C# with added parameters?
I don’t think so, you’d have to simulate doing the Places, take a look here https://stackoverflow.com/questions/265192/get-the-generated-sql-statement-from-a-sqlcommand-object
– Leandro Angelo