我的查询语句通过了:
string sqlCmd ="select id,name,sex,birth,edu,in_date,zhiwu,grade,renmian_time,dept from member where name like '%"+@QueryText+"%' or sex like '%"+@QueryText+"%' ";
SQL_SELECT_DatumInfoByKey="select DatumId,Type from Datum where Type like '%+@parm1+%' and Name=@parm2 ";
myCommand.Parameters.Add( //加入@param1的类型和值
myCommand.Parameters.Add(//加入@param2的类型和值
SQL_SELECT_DatumInfoByKey="select DatumId,Type from Datum where Type like @param1 and Name=@param2";
OleDbDataAdapter myCommand = new OleDbDataAdapter (SQL_SELECT_DatumInfoByKey, myConnection);
SQL_SELECT_DatumInfoByKey="select DatumId,Type from Datum where Type like %?% and Name=?";
OleDbDataAdapter myCommand = new OleDbDataAdapter (SQL_SELECT_DatumInfoByKey, myConnection);
这个like写法有问题,请问如何写