可以在command属性的数据源的SQL语句框中输入查询语句,其中的条件字段的值 写为?,值在程序中赋给 例:SQL语句为 select * from table1 where number=? and time between ? and ?DataEnvironment1.Connection1.Open DataEnvironment1.Command1 Text1.Text, strStarttime, strEndtime Set DataReport1.DataSource = DataEnvironment1 DataReport1.Show DataEnvironment1.Connection1.Close
http://easyprint.vip.myrice.com/
写为?,值在程序中赋给
例:SQL语句为
select * from table1 where number=? and time between ? and ?DataEnvironment1.Connection1.Open
DataEnvironment1.Command1 Text1.Text, strStarttime, strEndtime
Set DataReport1.DataSource = DataEnvironment1
DataReport1.Show
DataEnvironment1.Connection1.Close
easyprint.vip.myrice.com