Aaron, use a SqlDataReader or an OleDbDataReader to query your
database for an exact match - at first use "SELECT [FieldName] FROM
[TableName] WHERE [FieldName]='[SearchCriteria]'".
The results from the .ExecuteReader method will return the total
number of rows affected by the query. If that equals zero (which would
indicate no exact match) then modify the select statement to include
the SQL LIKE keyword and then execute the reader again - "SELECT
[FieldName] FROM [TableName] WHERE [FieldName] LIKE
'[SearchCriteria]'". If it still returns zero then no match would
exist, period.
This process would return and exact or approximate match. HTH JP
ku*****@yahoo.com (Aaron) wrote in message news:<b4**************************@posting.google. com>...
I need a query that can return wildcard matches if there's no exact
match. There's how the process works.
1. Input = "my email address is kf***@fsdf.com"
2. Look for exact match.
3. Look for wildcard match.
4. Found = "my * address *"
5. output = "my * address *"
I hope this makes sense,
Thanks in advance
Aaron