Finding records ...
-
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 ... My month article: Game programming by DirectX by Lan Mader. Please visit in: www.geocities.com/hadi_rezaie/index.html Hadi Rezaie
-
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 ... My month article: Game programming by DirectX by Lan Mader. Please visit in: www.geocities.com/hadi_rezaie/index.html Hadi Rezaie
Hi. The solution is very simple: SELECT * FROM Table WHERE Name Like 'Ali*' The question is, how to implement this: 1) If you're using Recordset-classes derieved by the classwizard, you have to modify the CDaoRecordset::m_strFilter member (like CMySet::m_strFilter = "Name like 'Ali*'). Remember that there is no 'WHERE'. 2) If you're using recordsets returned upon an querydef, just open the querydef with the whole SQL-string, including that 'like' condition. If you have further questions, you can contact me by eMail, as I'm often in touch with DAO and SQL in my projects. -------------------------------------------------- "Pseudocode is code to demonstrate a concept, not designed to be run. Like certain Microsoft software. "
-
Hi. The solution is very simple: SELECT * FROM Table WHERE Name Like 'Ali*' The question is, how to implement this: 1) If you're using Recordset-classes derieved by the classwizard, you have to modify the CDaoRecordset::m_strFilter member (like CMySet::m_strFilter = "Name like 'Ali*'). Remember that there is no 'WHERE'. 2) If you're using recordsets returned upon an querydef, just open the querydef with the whole SQL-string, including that 'like' condition. If you have further questions, you can contact me by eMail, as I'm often in touch with DAO and SQL in my projects. -------------------------------------------------- "Pseudocode is code to demonstrate a concept, not designed to be run. Like certain Microsoft software. "
Thanks aloooooooooot for your helps ... ;) My month article: Game programming by DirectX by Lan Mader. Please visit in: www.geocities.com/hadi_rezaie/index.html Hadi Rezaie