I am using MySqlCommand to bind parameters so things are properly escaped and sanitized but I'm not directly executing the command on the machine that generates it. I need to send it as raw SQL to another machine that executes it.
Right now I'm manually looping through parameters and replacing the CommandText but this doesn't do any of the sensitization. Anyone have any idea how to generate the SQL that is sent on .ExecuteNonQuery() ?
I need to send it as raw SQL to another machine that executes it.-that statement confuses me. You need to serialize the command and send it to a web service maybe to execute it?