代碼記錄一下:
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 }