很简单,传参啊
看以下代码
If Text1.Text = "" Then Text1.Text = "%"
If Text2.Text = "" Then Text2.Text = "%"
If Text3.Text = "" Then Text3.Text = "%"
If Text4.Text = "" Then Text4.Text = "%"
If Text5.Text = "" Then Text5.Text = "%"'传参
DataEnvironment1.Command2 Text1.Text, Text2.Text, Text3.Text, Text4.Text,Text5.Textdatareport2.show在数据环境下写入sql语句
select * from qq.custom_tab where cusnum like ? and areazhangno like ? and phone like ? and shzhangno like ? and wangno like ?
看以下代码
If Text1.Text = "" Then Text1.Text = "%"
If Text2.Text = "" Then Text2.Text = "%"
If Text3.Text = "" Then Text3.Text = "%"
If Text4.Text = "" Then Text4.Text = "%"
If Text5.Text = "" Then Text5.Text = "%"'传参
DataEnvironment1.Command2 Text1.Text, Text2.Text, Text3.Text, Text4.Text,Text5.Textdatareport2.show在数据环境下写入sql语句
select * from qq.custom_tab where cusnum like ? and areazhangno like ? and phone like ? and shzhangno like ? and wangno like ?
还是有点不明白啊,能详细一下吗?我只是对DIZHI这个字段查询就可以。能只对一个字段操作吗?
传一个参数
text1.text="你要的变量"DataEnvironment1.Command2 Text1.Text在数据环境下写入sql语句
select count(*) as 人数 from 表 where dizhi like ?