how to use parameter on mysqlcommand using LIKE on statment

how to use parameter on mysqlcommand using LIKE on statment

Postby janaya » Thu 02 Mar 2006 20:31

how to use myslcommand.parameter on STATEMENT like

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

Thank's

Javier anaya Ramirez
janaya
 
Posts: 1
Joined: Thu 02 Mar 2006 20:28

Postby Serious » Fri 03 Mar 2006 13:18

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


Return to dotConnect for MySQL