Private Sub Form_Load()
Dim ncd As String
ncd = Form1.cd
Dim str As String
str = "stlect *from 学生成绩管理 where 学号= ' & ncd & '"
Adodc1.RecordSource = str
Adodc1.Refresh
End Sub
一运行就提示无效的sql语句,期待....之类的。把adodc1.refresh删除之后就没有错误提示,但是sql查询就没有了作用。我没有配置odbc源,不是有个什么无源数据库查询么,也不知道是不是这样的。麻烦分析一下,谢谢
ps:cd是从form的datacombo选择框传递过来的文本。