If you can show us your method, we can help find errors.
If history (and SO) taught me anything, her
"You better be using Paramaterized SQL statements before posting any code"
If you do not know how to use parameterized commands, here is an example (taken from one of the answers where I did not use parameterized SQL)
var command = new MySqlCommand( "SELECT * FROM tblPerson WHERE LastName = @Name AND Height > @Height AND BirthDate < @BirthDate", connection); command.Parameters.AddWithValue("@Name", lastname); command.Parameters.AddWithValue("@Height", height); command.Parameters.AddWithValue("@Name", birthDate);
Try it if you havenโt done it yet and add some code :)
source share