Page 1 of 1

how to use parameter on mysqlcommand using LIKE on statment

Posted: Thu 02 Mar 2006 20:31
by janaya
how to use myslcommand.parameter on STATEMENT like

Example SELECT * FROM autor where nombre like '%FRANK%'

Thank's

Javier anaya Ramirez

Posted: Fri 03 Mar 2006 13:18
by Serious

Code: Select all

MySqlCommand command = new MySqlCommand("select * from dept where dname like :p1", connection);
command.Parameters.Add("p1", "%re%");