adodc1.refresh 方法iadoc失败,select子句有参数错误,标点符号不正确
检查了也不知道哪个select子句有问题?Private Sub refreshdata()
Adodc1.RecordSource = "select e.empid, e.empname AS 员工姓名, e.sex AS 性别," _
+ "e.title AS 职务,e.age AS 年龄,e.office_phone AS 办公电话," _
+ "e.mobile_phone AS 移动电话,e.salary AS 工资, d.depname AS 部门名称" _
+ " FORM employees e ,departments d WHERE e.depid=d.depid " _
+ "order by e.depid"
Adodc1.Refresh
With DataGrid1
.Columns(0).Width = 0
.Columns(1).Width = 800
.Columns(2).Width = 800
.Columns(3).Width = 800
.Columns(4).Width = 800
.Columns(5).Width = 1500
.Columns(6).Width = 2000
.Columns(7).Width = 1200
.Columns(8).Width = 1200
End With