title: Query in SQL Server Management Studio fails to pass date to linked InterSystems server
body: <p>I have a SQL Server and Cache server and need to combine some data. Most all functions are working, except when I attempt to pass a date with a variable or a parameter.</p>
  
  <p>Below is a test I ran (one of many).</p>
  
  <pre><code>declare @myDate datetime
  set @myDate = convert(datetime,'2012-02-01',120)
  
  select * from ccms..dbo.dcdnstat where timestamp &gt; '2012-02-01'  -- WORKS
  
  exec( 'select * from dbo.dcdnstat where cdn = ?', 21004) at ccms  -- WORKS
  
  exec( 'select * from dbo.dcdnstat where timestamp &gt; ?',@myDate) at ccms  -- ERROR 7213
  
  select * from ccms..dbo.dcdnstat where timestamp &gt; @myDate  -- ERROR 7322
  </code></pre>
  
  <blockquote>
    <p>Msg 7213, Level 16, State 1, Line 9 The attempt by the provider to
    pass remote stored procedure parameters to remote server 'ccms' 
    failed. Verify that the number of parameters, the order, and the
    values passed are correct. Msg 7322, Level 16, State 2, Line 11 A
    failure occurred while giving parameter information to OLE DB provider
    "MSDASQL" for linked server "ccms".</p>
  </blockquote>
  
  <p>I have tried different date formats, and as shown above I can query on other fields with variables and I can query on date if I use a specific value.</p>