|
-
April 25th, 1999, 04:05 PM
#1
Wildcard searching in CRecordSet
Hello!
Could anybody answer me why CRecordSet does not fetch any datarecords from a database when the sql includes wild cards.
I just formated a CString with a * as the wild card character. This caused no records to be found. The sql is completely correct and it executes well in access. Shall I maybe use some other methode than *?
Thanks in forward.
Hussam
-
July 24th, 2002, 11:21 AM
#2
What you want to use is %.
example
SELECT * FROM mytable WHERE name LIKE 'T%'
this will return everthing that has a name that starts with T.
If you would like to return every thing that has a T in the name use '%%T%%'.
Seeing what others do not see is called brilliance, knowing what others do not know is called genius.
--Sun Tzu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|