Hi,
The following code is to find the record in the database, I have a question to ask that, this function will do the sorting before find the record, the problem is I want to keep the order as it shows in database. is it possible to find the record without sorting??
Thanks,
fj8283888
The following code is to find the record in the database, I have a question to ask that, this function will do the sorting before find the record, the problem is I want to keep the order as it shows in database. is it possible to find the record without sorting??
Code:
Public Function SearchUserName(ByVal test3 As String, ByVal coltosearch As String) As Integer
If Not myds Is Nothing Then
If (myds.Tables.Count > 0) Then
myds.Tables("Staff").DefaultView.Sort = "FirstName"
Return myds.Tables("Staff").DefaultView.Find(test3)
Else
Return -1
End If
Else
Return -1
End If
End Function
fj8283888