[Mono-list] problem about "like"

Robert Jordan robertj at gmx.net
Mon Dec 3 04:10:44 EST 2007


billow dragon wrote:
> hi,guys:
> 
> Now i am in this situation:I want to use the cause "like",i wrote:
> string commd = "select * from buyerinfo where BuyerName like '%?blurName%'";

string commd = "select * from buyerinfo where BuyerName like ?blurName";

> MySqlParameter para = new MySqlParameter("?blurName", MySqlDbType.VarChar,
> 45, "BuyerName");
> para.Value = blurName;

MySqlParameter para = new MySqlParameter("?blurName",
MySqlDbType.VarChar, 45, "%BuyerName%");

Robert



More information about the Mono-list mailing list