请王杰帮忙!!!
我在数据适配器中如上所写(WHERE后的是光标),但在程序中怎样实现这个“单位 LIKE”呀?
private void crystalReportViewer1_Load(object sender, System.EventArgs e)
{
FileStream fileStreamObject1 = new FileStream("Data1.db", FileMode.Open, FileAccess.Read);
BinaryReader binaryReaderObject1 = new BinaryReader(fileStreamObject1);
string strName = binaryReaderObject1.ReadString(); //读取当前单位名称
dataSet11.Clear();
oleDbSelectCommand1.Parameters["单位"].Value =strName;
oleDbDataAdapter1.Fill(dataSet11);
CrystalReport3 myrpt = new CrystalReport3();
myrpt.SetDataSource(dataSet11);
crystalReportViewer1.ReportSource = myrpt;
fileStreamObject1.Close();
binaryReaderObject1.Close();
}
数据适配器中应该没什么改的了,我想应该是在oleDbSelectCommand1.Parameters["单位"].Value =strName;改吧?
具体的还请指导了,非常感谢!!!