title: error in stored procedure Access
body: <p>I have created a query which is: <code>SELECT Replace(column_name,a,b) AS expr1
  FROM table1;</code> the name of this query is:<strong>filepath</strong>.</p>
  
  <p>I have wrote the following code in C#. when i compile the code it <strong>Syntax error in PROCEDURE clause.</strong> </p>
  
  <pre><code>            OleDbCommand cmd1 = new OleDbCommand();
              cmd1.Connection= ren_connection1;
              cmd1.CommandType = CommandType.Text;
              cmd1.CommandText = "Execute filepath";
  
              OleDbParameter oldfilevalue = new OleDbParameter();
              oldfilevalue.ParameterName = "a";
              oldfilevalue.OleDbType = OleDbType.VarChar;
              oldfilevalue.Direction = ParameterDirection.Input;
              oldfilevalue.Value = oldname2;
  
              OleDbParameter newfilevalue = new OleDbParameter();
              newfilevalue.ParameterName = "b";
              newfilevalue.OleDbType = OleDbType.VarChar;
              newfilevalue.Direction = ParameterDirection.Input;
              newfilevalue.Value = oldname1;
  
              cmd1.Parameters.Add(oldfilevalue);
              cmd1.Parameters.Add(newfilevalue);
  
              i = cmd1.ExecuteNonQuery();
  </code></pre>
  
  <p><em><strong>//oldefile value can be like this: D:/myfile/pictures/cars/
  //newfile value can be like this: D:/myfile/pictures/jeeps/</em></strong></p>
  
  <p>i want to replace in a row a string with another string without modifying the whole row..and i thought replace will work but it didnt :(</p>
  
  <p>access version is:2007.</p>
  
  <p>any idea or help will be greatly appreciated.</p>
  
  <p>Thanks alot.</p>