使用C#操作Access参数形式的模糊查询方法
代码记录一下:
1public static DataTable getByName(string typeName)
2 {
3 StringBuilder sb = new StringBuilder();
4 sb.Append("select * from type1 where typeName like @typeName");
5 OleDbParameter[] param =
6 {
7 OleDbHelper.GetParameter("@typeName",OleDbType.VarChar,50,"[typeName]","%"+typeName+"%")
8 };
9 return OleDbHelper.ExecuteDt(sb.ToString(), param);
10 }