vb treeview 控件的节点单击事件调试问题
PrivateSubTreeView1_NodeClick(ByValnodeAsMSComctlLib.node)Text1.text=TreeView1.Select...
Private Sub TreeView1_NodeClick(ByVal node As MSComctlLib.node)
Text1.text = TreeView1.SelectedItem.key
Adodc1.RecordSource = "select * from StudentInfo where name=" + Trim(Text1.text) + ""
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Text2.text = Adodc1.Recordset.Fields("age")
Text3.text = Adodc1.Recordset.Fields("email")
End If
End Sub
为什么调试总是在adodc1.refresh报错,去掉这一句又不能完成设定目的,text2和text3都没记录,郁闷求解中…… 展开
Text1.text = TreeView1.SelectedItem.key
Adodc1.RecordSource = "select * from StudentInfo where name=" + Trim(Text1.text) + ""
Adodc1.Refresh
If Adodc1.Recordset.RecordCount <> 0 Then
Text2.text = Adodc1.Recordset.Fields("age")
Text3.text = Adodc1.Recordset.Fields("email")
End If
End Sub
为什么调试总是在adodc1.refresh报错,去掉这一句又不能完成设定目的,text2和text3都没记录,郁闷求解中…… 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询