title: C# error "Could not find Stored procedure" if DB collation is not “SQL_Latin1_General_CP1_CI_AS”
body: <p>This is the situation that I encountered:</p>
  
  <hr>
  
  <p><strong>A) C# code: execute stored procedure "Check_Data"</strong></p>
  
  <ul>
  <li>I would like to state that there is nothing wrong with my C# code here as it is as basic as it can get, and it is also double-checked by me and my co-workers. </li>
  </ul>
  
  <p><strong>B) SQL Server:</strong> </p>
  
  <ul>
  <li><p>All DBs are MSSQL2005. Please do not suggest to upgrade them, as this is what my client uses.</p></li>
  <li><p>Please note that all 4 DBs below is created in the exact same way, as well as the stored procedure "Check_Data". The only difference is the collation of each DB.</p></li>
  <li><p>I used user "sa" to connect to all DB to make sure that there is no problem with permission.</p></li>
  <li><p><strong>Instance A:</strong> collation “SQL_Latin1_General_CP1_CI_AS”</p>
  
  <ul>
  <li><strong>DB 1:</strong> collation “SQL_Latin1_General_CP1_CI_AS”
  => C# code run successful.</li>
  <li><strong>DB 2:</strong> collation “Vietnamese_CI_AS”
  => C# code has error "Could not find Stored procedure" .</li>
  </ul></li>
  <li><p><strong>Instance B:</strong> collation “Vietnamese_CI_AS”</p>
  
  <ul>
  <li><strong>DB 1:</strong> collation “SQL_Latin1_General_CP1_CI_AS”
  => C# code run successful.</li>
  <li><strong>DB 2:</strong> collation “Vietnamese_CI_AS”</li>
  </ul></li>
  </ul>
  
  <blockquote>
    <p>=> C# code has error "Could not find Stored procedure" .</p>
  </blockquote>
  
  <hr>
  
  <p>So basically, my DB just hate collation <code>“Vietnamese_CI_AS”</code> and refuse to get this stored procedure.</p>
  
  <p>This is the script of <strong>"Check_Data"</strong>:</p>
  
  <pre><code>CREATE PROCEDURE [dbo].[Check_Data]
  (   
      @Acc    nvarchar(50),   
      @Status varchar(500) OUTPUT)
  AS
  BEGIN
  
  if exists (select 1 from tblRequest where Acc=@Acc)
  
      SET @Status = '1'--have data
  else
      SET @Status = '0'--have not data        
  END
  </code></pre>
  
  <p>Could anyone tell me what is wrong with it?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>When I use above script to create new proc will different name (Check_Acc), the code call this new proc successfully.</p>
  
  <p>Therefore, for the time being, I will go with this solution and rename all proc that have this problem.</p>
  
  <p>However, I am really appreciated if I know what make the code unable to call the original proc. </p>