VB中,如何将查询结果放到DATAGRID中显示出来。

2025-01-13 04:44:14
推荐回答(3个)
回答1:

1:
Adodc1.RecordSource = "SELECT * From 人员 Where 姓名='张三'"
Adodc1.Refresh
2:
Adodc1.RecordSource = "SELECT * From 人员 Where 姓别='男' And 部门='销售部'"
Adodc1.Refresh

回答2:

举两个例子:
Adodc1.RecordSource = "SELECT * From 人员 Where 姓名='张三'"
Adodc1.Refresh

Adodc1.RecordSource = "SELECT * From 人员 Where 姓别='男' And 部门='销售部'"
Adodc1.Refresh

回答3:

将where语句后的条件,用变量表达