title: Calling a pre-defined Access query using ODBC in ADO.NET
body: <p>I am using c# and <code>OdbcConnection</code> to connect to an Access database. Inside the database there is a pre-defined query that I want to run (like a stored proc in Sql Server). This used to be dead easy with the old COM-based ADO but it doesn't seem to work in ADO.net</p>
  
  <pre><code>OdbcConnection conn = AccessConnect.Connect();
  var cmd = conn.CreateCommand();
  cmd.CommandText = @"MyAccessQuery;";
  cmd.CommandType = CommandType.StoredProcedure;
  var da = new OdbcDataAdapter(cmd);
  var ds = new DataSet();
  da.Fill(ds);
  </code></pre>
  
  <p>Is there a way round it or am I going to have to duplicate my Access query in C# code?</p>