Search Recordset for substrings
Posted on 2004-08-11
I am retrieving data form a SQL Server database in a VB6 ADO program.
SELECT NAME FROM TABLE1 WHERE NAME like " & sql1 & " ORDER BY NAME
sql1 contains the first 2 digits from a user entered string
I am searching the recordset with
rec2.Find "Name= '" & txtsearch & "' "
to position on the full user entered string (contained in txtsearch)
This works fine, if the user enters the complete name. If the user enters only a few digits, I would like to position on the first occurence of this substring.
Thanks for your help