数据库查询问题
第一个问题:这个查询代码是按排序方法查找的,能不能输入头一个字母就查找出结果的代码?比如"D*'就把D开头的所有记录
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Dim intposition As Integer
Select Case ComboBox1.SelectedIndex
Case 0
objdataview.Sort = "姓名"
Case 1
objdataview.Sort = "地址"
Case 2
objdataview.Sort = "联系电话"
End Select
intposition = objdataview.Find(TextBox1.Text)
If intposition = -1 Then
txtrecordposition.Text = "找不到数据"
Else
objcurrencymanager.Position = intposition
End If
showposition()
End Sub
第二个问题:查找记录中摸个列(数据类型)的最大值代码怎么写?