ADO database searching
Posted on 2001-06-10
I am using MS ADO 2.6 and I want to know how do I search a column for a certain entry. I have a table called UserLog with columns called: Name, Date, Time. The Name column has an index called PrimaryKey to prevent multiple entries. How do I search the Name column for an entry called John Doe and will find it fast(I have a lot of entries in the database)?
This is my code to connect to the database:
Private Sub Command1_Click
Dim ILConnect As New ADODB.Connection
Dim ILRecordset As New ADODB.Recordset
ILConnect.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=C:\windows\desktop\dfd.mdb"
ILRecordset.LockType = adLockPessimistic
ILRecordset.Open "UserLog", ILConnect, , , adCmdTable