Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding records ...

Status
Not open for further replies.

HadiRezaee

Technical User
Mar 9, 2001
165
IR
Hi all,
I wanna find all records that the name field is "Ali" or like "Ali" ... for example "AliReza" or "alireza" !!!
How can i do that ?
Can i use of Find function or i must use of SQL string ???
I'm using of DAO ...
 
what does it have to do with C++? Learn SQL.
There is something like
select * from YourTable where YourColumn like '%Ali%' John Fill
1c.bmp


ivfmd@mail.md
 
Hi again,
Can you tell me, where i must write this SQL string ?
I must write it in CDaoRecordset::Open Function ?
 
Hi john,
LIKE don't work !!!
str1 = select * from YourTable where YourColumn = 'Ali'
str2 = select * from YourTable where YourColumn like '%Ali%'


str1 will work ...
But str2 won't work ...



 
it is driver specific. In SQL Server and in Access it sure works. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top