From: Jay Miller Date: March 18 1999 2:43pm Subject: RE: Access <-> MyODBC <-> MySQL problem List-Archive: http://lists.mysql.com/myodbc/53 Message-Id: <000601be714d$bf99c9e0$f21d6ad8@jay.office.socket.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit > Struan> I've designed an Access Query such that the Access 'SQL > View' says: > > Struan> SELECT RawM.Name, * FROM RawM WHERE (((RawM.Name) Like > 'MYINFOBOX%')); > > Struan> Umm?! Can anyone tell me how/why the SQL "Like" (in the > original SQL > Struan> statement) been changed to an "="? And by what? Or should > I post this > Struan> query to the MyODBC list? > Struan> However, the appropriate excerpt from the MyODBC log file says: > > Struan> MSACCESS de:aa ENTER SQLExecDirect > Struan> HSTMT 0x008b24f0 > Struan> UCHAR * 0x086513d4 [ -3] > "SELECT RawM.ID FROM RawM WHERE (Name = 'MYINFOBOX%' ) " > Struan> SDWORD -3 I believe that the reason Access is translating the query is because it doesn't see any wildcards in your comparison string. Access uses '*' rather than '%' as a wildcard. Since it doesn't see any wildcards in your query, it changes it to the faster '=' comparison. Two options to resolve it: 1) If you change your query to a Pass-Through query (Query | SQL Specific | Pass-Through) it won't translate. 2) If you change your wildcard character to '*', Access will see it as a wildcard and pass it to mysql as '%'. Jay Miller Socket Internet Services Columbia, MO, US