Click to See Complete Forum and Search --> : SQL query for strings criteria


Shahzad
April 6th, 1999, 01:49 PM
I am using an Access database connected with my my project. I want to match a string in the SQL query and my query is:
table.m_strFilter = "[Extensions].[Extension_Name] Like '"+m_strName+CString("'");

it executes well but its equivalent does not, which is:
table.m_strFilter = "[Extensions].[Extension_Name] Like 'Don'";

assume that m_strName in first one is Don.
Why does not it execute to give correct results, though it does not give compiler error.