title: Undefined function 'Replace' in expression , Replace alternative?
body: <p>as read in this question : <a href="https://stackoverflow.com/questions/6341465/undefined-function-replace-in-expression">Undefined function &#39;Replace&#39; in expression</a>  , I'm getting the error "Undefined function 'Replace' in expression" because "you aren't using the Access query engine at all", but what do I use as an alternative ? Apparantly "a combination of Iif, Instr" would work, but I can't find out a way to actually replace something with these.</p>
  
  <p>All I want is to remove the spaces out of a value, how would I do this?</p>
  
  <pre><code>const string strSql = "SELECT TOP 15 HOOFDGROEP.HOOFDGROEP, SUBGROEP.SUBGROEP, Artikels.*" +
                                    " FROM (Artikels LEFT JOIN HOOFDGROEP ON Artikels.HOOFDGROEPID = HOOFDGROEP.ID)" +
                                    " LEFT JOIN SUBGROEP ON Artikels.SUBGROEPID = SUBGROEP.ID WHERE REPLACE(ArtikelNaam, ' ', '') LIKE  '%' + @ArtikelNaam + '%'";
  
              var objCommand = new OleDbCommand(strSql, _objConnection);
              objCommand.Parameters.Add("@ArtikelNaam", OleDbType.Char).Value = naamZoeker.Replace(" ", "");
  </code></pre>