private void shijianduanchaxun () // 时间段查询的时候所要实现的功能
{
OleDbConnection connection =
new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=C:\Documents and Settings\Administrator\桌面\班费管理模块\feemanage.mdb");
connection.Open();
textBox1.SelectionStart = 0;
textBox1.SelectionLength =10;
string text1 = textBox1.Text.Trim();
// 从textbox中获得数据 即查询语句 如 2006/08/09 AND 2007/08/06
textBox1.SelectionStart = 11;
textBox1.SelectionLength = 10;
string text2 = textBox1.Text.Trim();
string strCommand=
"SELECT * FROM feemanage WHERE time BETWEEN"+text1+"AND"+text2;
OleDbCommand cmd=new OleDbCommand(strCommand,connection);
OleDbDataReader reader=cmd.ExecuteReader();
这一句有问题 我 改了很多次都错了不知道怎改才好?? 我也曾试过这样改过
加了+“‘”还是不行 请各位帮帮忙 ??我把我的所有代码传上了 !!