查找5月份出生的员工:
select * from table where Month(Birthday)=55月份出生的员工并且他的部门为销售部:
select * from table where Month(Birthday)=5 And Dept='销售部'以上是SQL的写法。在C#中,没有测试以下语句是否可以通过:
EmployeeDV.RowFilter = "部门名称='"+ 部门名称字符串 + " ' AND Month(生日)=" + 月份字符串
select * from table where Month(Birthday)=55月份出生的员工并且他的部门为销售部:
select * from table where Month(Birthday)=5 And Dept='销售部'以上是SQL的写法。在C#中,没有测试以下语句是否可以通过:
EmployeeDV.RowFilter = "部门名称='"+ 部门名称字符串 + " ' AND Month(生日)=" + 月份字符串
这样写不行!!报的错是:
其他信息: 表达式包含未定义的函数调用 Month()。
关于增加字段并设置其内容的方法请参考:http://dev.csdn.net/develop/article/22/22710.shtm