老师,好
外部SQL数据库,设置查找按钮后,如何让其实现后台查找,并定位到查找的信息。
应该怎么改下面的代码?
Dim ftx As WinForm.TextBox = e.Form.Controls("xmcz")
Dim st As String = ftx.Value '定插件内容
Dim mh As WinForm.CheckBox = e.Form.Controls("模糊") '引用插件
Dim dr As DataRow
If mh.Checked Then '如果选中
dr = DataTables("我的客户").sqlfind("姓名 Like '%" & st & "%'")'模糊查找
Else
dr = DataTables("我的客户").sqlfind("姓名 = '" & st & "'")'精确查找
End If
If dr IsNot Nothing
Dim bt As Integer = Tables("我的客户").findrow(dr)
If bt >= 0 Then
Tables("我的客户").Position = bt
End If
Else
MessageBox.Show("没有找到符合条件的项", "提示")
End If