string strcmd = "select * from employee where text_name like '*Q*'";
在ACCESS中可以查找出来与Q相关的数据,但是在程序中就运行不出来了.
具体如下:
public DataSet GetDataSet()
{
try
{
string strcmd = "select * from employee where text_name like '*Q*'";
conn.Open();
OleDbCommand cmd = new OleDbCommand(strcmd, conn);
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "employee");
return ds;
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
finally
{
conn.Close();
}
在ACCESS中可以查找出来与Q相关的数据,但是在程序中就运行不出来了.
具体如下:
public DataSet GetDataSet()
{
try
{
string strcmd = "select * from employee where text_name like '*Q*'";
conn.Open();
OleDbCommand cmd = new OleDbCommand(strcmd, conn);
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "employee");
return ds;
}
catch (Exception e)
{
throw new Exception(e.Message, e);
}
finally
{
conn.Close();
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货