Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[MySQL][ODBC 3.51 Driver][mysqld-5.5.5-10.11.6-MariaDB-log]You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'on indice.idann=.id right join costantiluoghi on indice.idarea=costantiluoghi...' at line 1

/included/pages/includedsearch.asp, line 4642