在VB中如何动态地修改ADO控件中的RecordSource属性的值?

来源:百度知道 编辑:UC知道 时间:2024/05/17 18:32:29
RecordSource中的值是表名,而不是查询!

我没有太理解你的意思 我给你写一个例子把
dim str as string
str=trim(text1.text)'text1录入学号
adodc1.recordsource="select * from 表名 where 学号='" & str & "'"
然后刷新adodc1
不知道是否能帮你